Comments (7)
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.
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.
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.
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.
Yep, that did it!
Thank you for your help, Ryan!
from centaur.
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.
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)
- Centaur redirecting to wrong place HOT 2
- Laravel 5.4 support? HOT 1
- Illuminate\Console\AppNamespaceDetectorTrait not found HOT 1
- Only mailables may be queued. InvalidArgumentException in Mailer.php line 314: HOT 3
- How can i use correctly remember me HOT 4
- Allowing users to edit only their own articles HOT 4
- Only mailables may be queued. InvalidArgumentException in Mailer.php line 326: HOT 1
- Social login HOT 2
- Expected response code 250 but got code "530", with message "530 5.7.1 Authentication required" HOT 6
- Laravel 5.5 support? HOT 3
- Invalid credentials error is not shown HOT 3
- Need help at upgrading from rydurham/Sentinel HOT 5
- Loop after role deletion HOT 2
- Laravel 5.7 release HOT 2
- Activation route redirects to error page HOT 2
- Account Not Yet Activated Debug page Change HOT 7
- Laravel 6 ( Swift_TransportException (530) Expected response code 250 but got code "530", with message "530 5.7.1 Authentication required ") HOT 3
- Laravel 7, Centaur 10 - "DetectsApplicationNamespace" HOT 2
- Laravel 8 and Cartalyst 5 support. HOT 1
- Dear Centaur can you please let me know when php 8.0 support will be available? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from centaur.