GithubHelp home page GithubHelp logo

Comments (7)

rydurham avatar rydurham commented on July 17, 2024

Hello! Let's see what we can figure out.

You can check the contents of the errors variable by adding this line to your primary template:

{!! var_dump($errors->getMessages()) !!}

Try adding that and running those tests again. If you see the errors in the var_dump but not in the html then there is a problem with how they are being displayed. If you don't see them there at all then there is a problem with how they are being returned from the controllers.

from centaur.

 avatar commented on July 17, 2024

I haven't modified any of the original templates so I added your line below @yield('content') in the layout.blade file.

In all pages, all tests return this variable as an empty array.

from centaur.

 avatar commented on July 17, 2024

I recorded a short screencast demonstrating step-by-step what I'm doing and the problem happening in real time. I hope this helps.
https://www.youtube.com/watch?v=st9iVjpCiSM

from centaur.

rydurham avatar rydurham commented on July 17, 2024

Thanks for the video! That was very helpful. I believe I know what the problem is.

When Laravel 5.2 was released it included the ability to create middleware groups, with the idea being that you could specify one set of middleware to be used for browser access and another for direct api access, or something else like that. It used to be that the routes in the routes file had to be added to the "Web" group manually in order for them to work as expected. However, a later version of 5.2 changed the setup so that routes in the routes file were included in the web group by default.

The centaur readme still has instructions that say to explictly assign the centaur routes to the "web" middleware group, but that is no longer necessary. Remove the Route::group(['middleware' => ['web']], function () { lines from your routes file and everything should work as expected. I will update the readme as well.

// app/Http/routes.php

// Authorization
Route::get('/login', ['as' => 'auth.login.form', 'uses' => 'Auth\SessionController@getLogin']);
Route::post('/login', ['as' => 'auth.login.attempt', 'uses' => 'Auth\SessionController@postLogin']);
Route::get('/logout', ['as' => 'auth.logout', 'uses' => 'Auth\SessionController@getLogout']);

// Registration
Route::get('register', ['as' => 'auth.register.form', 'uses' => 'Auth\RegistrationController@getRegister']);
Route::post('register', ['as' => 'auth.register.attempt', 'uses' => 'Auth\RegistrationController@postRegister']);

// Activation
Route::get('activate/{code}', ['as' => 'auth.activation.attempt', 'uses' => 'Auth\RegistrationController@getActivate']);
Route::get('resend', ['as' => 'auth.activation.request', 'uses' => 'Auth\RegistrationController@getResend']);
Route::post('resend', ['as' => 'auth.activation.resend', 'uses' => 'Auth\RegistrationController@postResend']);

// Password Reset
Route::get('password/reset/{code}', ['as' => 'auth.password.reset.form', 'uses' => 'Auth\PasswordController@getReset']);
Route::post('password/reset/{code}', ['as' => 'auth.password.reset.attempt', 'uses' => 'Auth\PasswordController@postReset']);
Route::get('password/reset', ['as' => 'auth.password.request.form', 'uses' => 'Auth\PasswordController@getRequest']);
Route::post('password/reset', ['as' => 'auth.password.request.attempt', 'uses' => 'Auth\PasswordController@postRequest']);

// Users
Route::resource('users', 'UserController');

// Roles
Route::resource('roles', 'RoleController');

// Dashboard
Route::get('dashboard', ['as' => 'dashboard', 'uses' => function() {
    return view('centaur.dashboard');
}]);

from centaur.

 avatar commented on July 17, 2024

Yep, that did it!

Thank you for your help, Ryan!

from centaur.

deewahyu avatar deewahyu commented on July 17, 2024

I was installer centaur in Laravel 5.4, however, because my email sender not yet configured, so i cannot use a new registered account without following activation link. I would like to know, what is the default account of admin and user in centaur?

from centaur.

rydurham avatar rydurham commented on July 17, 2024

The default account data can be found here: https://github.com/SRLabs/Centaur/blob/master/seeds/SentinelDatabaseSeeder.php

These accounts will only be available if you have run the seeder.

from centaur.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.