Comments (17)
Authentication in Laravel is a bit more complicated than that. Therefore, we've linked to the Laravel 5.1 and 5.2 documentation.
The extadm
interface is the expert mode where you can do anything supported by Aimeos. But it's too complicated for casual users, so we've created the jqadm
interface as alternative.
from aimeos-laravel.
I had the same problem, I think it will be useful to specify the documentation php artisan make: auth
for laravel 5.2 users
and why did you two admin interface?
/admin
/extadm
from aimeos-laravel.
You forgot to create your page template: https://github.com/aimeos/aimeos-laravel#setup
from aimeos-laravel.
Thank you it works
do i have to adjust anything for admin to make it works out?
from aimeos-laravel.
when it try to login to Admin i got following error:
NotFoundHttpException in RouteCollection.php line 161:
in RouteCollection.php line 161
at RouteCollection->match(object(Request)) in Router.php line 823
from aimeos-laravel.
Setting up authentication is a bit tricky in Laravel because it depends on the version and 5.1/5.2 are totally different. Please set up authentication according to the Laravel docs first and test if it works. Afterwards, follow the docs: https://github.com/aimeos/aimeos-laravel#admin
If you use Laravel 5.1, don't forget to set up the /login route!
from aimeos-laravel.
Thank you alot for fast replying
I used laravel 5.2
and i followed the steps in url you gave
and i replaced
the whole function boot
by the following function
public function boot(GateContract $gate)
{
// ...
$gate->define('admin', function($user) {
return app( '\Aimeos\Shop\Base\Support' )->checkGroup( $user->id, 'admin' );
});
}
so do i miss anything?
from aimeos-laravel.
You must not replace the whole method, only add the $gate->define()
call because at least the parent::...
before is important
from aimeos-laravel.
my file looks like
namespace App\Providers;
use Illuminate\Contracts\Auth\Access\Gate as GateContract;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;class AuthServiceProvider extends ServiceProvider
{
/**
* The policy mappings for the application.
*
* @var array
*/
protected $policies = [
'App\Model' => 'App\Policies\ModelPolicy',
];/** * Register any application authentication / authorization services. * * @param \Illuminate\Contracts\Auth\Access\Gate $gate * @return void */ public function boot(GateContract $gate) { // ... $this->registerPolicies($gate); $gate->define('admin', function($user) { return app( '\Aimeos\Shop\Base\Support' )->checkGroup( $user->id, 'admin' ); }); // }
}
is that what you mean?
from aimeos-laravel.
Yes, exactly.
from aimeos-laravel.
i think frontend shop is working
and admin login page is working too
http://127.0.0.1:8000/admin
but when i use email and password the url redirect
to http://127.0.0.1:8000/login
and give me the following error:
`Sorry, the page you are looking for could not be found.
1/1
NotFoundHttpException in RouteCollection.php line 161:
in RouteCollection.php line 161
at RouteCollection->match(object(Request)) in Router.php line 823
at Router->findRoute(object(Request)) in Router.php line 691
at Router->dispatchToRoute(object(Request)) in Router.php line 675
at Router->dispatch(object(Request)) in Kernel.php line 246
at Kernel->Illuminate\Foundation\Http{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing{closure}(object(Request)) in CheckForMaintenanceMode.php line 44
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in Kernel.php line 132
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 99
at Kernel->handle(object(Request)) in index.php line 54
at require_once('D:\xampp\htdocs\laravel\aimeos-shop\public\index.php') in server.php line 21`
Thank you in advance
from aimeos-laravel.
If you are using Laravel 5.2, php ./artisan make:auth
should have added a /login
route:
https://laravel.com/docs/5.2/authentication
You can check with php ./artisan route:list
from aimeos-laravel.
Thank you for replying
now i got no errors
from aimeos-laravel.
I followed all of the instructions using 5.2, I am getting error:
Class App\Providers\GateContract does not exist
Did I miss something?
from aimeos-laravel.
Did you create the authentication stuff with php artisan make: auth
?
from aimeos-laravel.
@quoport , were you able to find a solution to this problem?
Class 'App\Providers\Gate' not found
from aimeos-laravel.
@worla What Laravel and Aimeos versions are you using?
from aimeos-laravel.
Related Issues (20)
- Some functions report an error HOT 3
- API with laravel sanctum HOT 1
- laminas/laminas-diactoros problem with Laravel 10 and PHP 8.1+ HOT 1
- Running Custom Cronjob in Aimeos Laravel. HOT 1
- rest api for client aplication HOT 3
- error while running aimeos:setup HOT 1
- Please disregard
- 404 on catalog-filter.js and catalog-filter.css HOT 6
- Showing Class "\Aimeos\MShop\User\Manager\Standard" not found HOT 1
- Can't access to admin panel on fresh install
- Pricing rules issue, getting reset after placing order HOT 1
- How these actions are defined ? HOT 1
- Correction to installation instructions needed when installing Laravel Breeze HOT 1
- Integrating Urway-Payment into Aimeos Laravel Package HOT 2
- SQL syntax Error when running setup command. HOT 2
- [Solved] Dependency issue when installing aimeos... psr/http-message HOT 1
- The extension jqadm's index.blade.php is not taken into consideration HOT 1
- Changing shop prefix A non-recoverable error occurred in header (categories menu and search) HOT 8
- Auth API HOT 3
- New release supporting Laravel 11 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 aimeos-laravel.