Git Product home page Git Product logo

laravel-multiauth's Issues

ErrorException : Undefined offset: 0

ErrorException : Undefined offset: 0

at C:\Users\Shadrac\Desktop\Projects\bimapay\vendor\bitfumes\laravel-multiauth\src\Console\Commands\MakeMultiAuthCommand.php:183
179| return;
180| }
181|
182| preg_match('/\s+/**\n\s+*\s(\w+\s)+"web"\s(\w+\s)+\w+.\n/', $provider, $match);

183| $provider = str_replace($match[0], $map . $match[0], $provider);
184| /********** Function Call **********/
185|
186| $map_call = file_get_contents($this->stub_path . '/routes/map_call.stub');
187|

Controller files not published

thank u for this package it is so helpful!
Please add command to publish a controller files to default controller.
i want to add/edit mutliauth controllers but it is difficult to me every time go to vendor and edit files.

Package not update

Hi Sarthak, there is no commond define multiauth or namespace and /admin not call login page so error found in route .i am using laravel5.4.30v plz tell me.

Creating register method for controller not working.

I created my own post register method yet it still use the old post register. I modify it into redirect to login, and also var_dump the validator with a commented return, still not works, it still redirect to route site.com/customer/register not site.com/customer/login

/app/Http/Controllers/Customer/Auth/RegisterController.php

public function postRegistrationForm(Request $request)
{
    // return $request->all();
    var_dump($this->validator($request->all())->validate());

    return redirect()->route('login')
        ->with(['success' => 'Congratulations! your account is registered, you will shortly receive an email to activate your account.']);
}

and on my routes\customer.php

Route::group(['namespace' => 'Customer'], function() {
...
    Route::get('login', 'Auth\LoginController@showLoginForm')->name('customer.login');
    Route::post('login', 'Auth\LoginController@login');
    Route::post('register', 'Auth\RegisterController@postRegistrationForm'); // <--------
...
});

It can run the route but it has different result. I can't get the var_dump($this->validator($request->all())->validate());

untitled

Originally posted by @jeraldpunx in #45 (comment)

FatalThrowableError for "role"

If i try to access route without login which has "->middleware('role:super')" it throws "Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR) Call to a member function roles() on null" this error.

Email Verification

if we want to add the email verification in admin as well as other auth like in my case there are two other auth and i m using laravel 5.7 but there is not email verify in migrations and other email verification functionality in predefined things so what i have to do now to add email verification in my admin and other users...??

one login form for all auth's

is there possible to make one login form for this ?

to chek first admin auth and then > another auth > users auth??
after login redirect to specific auth view ?

Publish the all files and assets

Is it possible to publish the all files and assets

I use a custom admin template and my projects always have various needs of customization.

Thanks.

Multi language support

Thanks for this awesome project!
Do you have any plans to support language files (eg. lang/en/messages.php) ?

Migration Rollback Error

php artisan migrate:rollback returns error. Not able to drop the Multiauth "admins" table.

[Logs]
...
Rolling back: 2017_03_06_053834_create_admin_role_table
Rolled back: 2017_03_06_053834_create_admin_role_table
Rolling back: 2017_03_06_023521_create_admins_table

Illuminate\Database\QueryException : SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (SQL: drop table if exists admins)

at ..\vendor\laravel\framework\src\Illuminate\Database\Connection.php:664
660| // If an exception occurs when attempting to run a query, we'll format the error
661| // message to include the bindings with SQL, which will make this exception a
662| // lot more helpful to the developer instead of just the database's errors.
663| catch (Exception $e) {

664| throw new QueryException(
665| $query, $this->prepareBindings($bindings), $e
666| );
667| }

Did I do anything wrongly? Please advise.
Thanks.

mail sending error .

how can i see the error logs of unsuccessful mail requests? mails are going thru smoothly when i am using mailtrap, but not working when i am using my websites smtp settings.

Access to admin routes without login caused FatalThrowableError

For instance, after we added @admin('editor') to the post.blade.php, if we tried to access this route without login, FatalThrowableError will occur.
Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Call to a member function roles() on null

This happens to routes with 'super' role too,
Of course if we access the routes after login, it will be fine.

How to override Multiauth controller & model class/method

Hi Sarthak,
I need to customize your Multiauth controller & model to suit my applications. Could you please teach me the proper way to override your controller & model class/method?

So far I've been editing your controller & model inside the vendor/bitfumes/ folder. But this is not a proper way as compoer update will overwrite my changes.

Thanks.

I want the active/inactive checkbox while creating the user

I want the active/inactive checkbox while registering the user.
I don't have access to the controller to do so.
If it is not possible, I don't want the active/ inactive functionality.
Can you help me out to do either any one of the above issue solved.

Thanks in advance

Error => Call to undefined function Bitfumes\Multiauth\Exception\array_get()

I've installed a the latest bitfumes/laravel-multiauth in to Laravel/framework version ^6.0.

Once I'm logged in everything works okay but when logged out and visit lets say "/admin/show" it gives an error instead of redirecting to /admin.

image

I've used previous bitfumes/laravel-multiauth versions on previous Laravel?framework versions and and works with no errors.

Not sure if is a bug somewhere or if is it me. I would appreciate your help.

PS: Your package is amazing, it takes a lot of headache.

Thanks

loggedOut error

when i click on logout on the super admin, it displays BadMethodCallException
Bitfumes\Multiauth\Http\Controllers\LoginController::loggedOut does not exist

I want to use middleware for 2 roles in a single route

I want this route to be protected and can be viewd only to the admins with role 'dgs admin' and 'dgcomm admin'. I am trying this, but not working for both together.

Route::get('/incidentLog', function () {
return view('incidents.incidentLog');
})->middleware('role:dgcomm admin', 'role:dgs admin');

How to permit 'verify email'

Hi, I truly love your multi Auth package, but i am having a hard time adding the verify email feature to the new auth i created. I know i have to do this Auth::routes(['verify' => true]) in my 'web route' for normal user,
but where do i put this in the new auth, since the all routes are place in a group under the auth namespace..

RegisterController can't find

I want to edit the post of RegisterController but I can't find it.

Route::post('register', 'Auth\RegisterController@register');

and when I view the app\Auth\RegisterController.php, there is no register method.

Login using username instead of email id

Thank you for this awesome package.
I have a column in admin table which is accepting username while registering the user.
Now I want username to be used with the password for the login instead of email which the package provides.
I am not receiving the emails too. And I want to change the user's password using the emails.

Regards,
-Mayur

Access forbidden! You don't have permission to access the requested directory.

When I have used index.php in the url the routes the /admin it works. But without using index.php it throws the problem. Can you please help me to solve the problem?

Note: I am using a shared hosting to deploy my project. I have changed the root directory to public_html/public. I have no SSH/Shell access.

Shared Hosting Problem

I have also faced the problem after using php artisan serve cmd in my local development environment but the problem is different.

Local delvelopment Env

No email after registring the new admin

There is no email sent to the users after they have been registered as admin.

The problem is not the mailing system because the password recovery system works.
Could there be a break or anything? I really needed that feature implemented in my production level system.

Laravel Queue

Nice package Bro. Please, integrate laravel queue into your mail system when sending mails. Thanks

Error after installing this package.

route-error
I think it is route error.
Also after installing this package by composer command, i see it it on require object in composer.json file.
Hope you can get what's going on.

Logout admin side automatically logged out the front user and vice versa

I have two authentications system. One is this multi-auth for admin and other is laravel default auth for the front user. If logout from the front user, admin automatically get log out and vice versa.
For admin logout I am using route(admin.logout) and for front user, I am using route(logout)

Admin List visible to other Admins, apart from super

When you are logged in with a role other than super and manually navigate to /admin/show, the list of registered admins is visible.

Although other actions are not allowed, this minor middle-ware error should be fixed.

Getting Error page while deleting role assigned to any admin person

Hello Sarthak,

I have created one role called editor and i have registered one admin into that role, but when i am trying to delete that role its giving me an laravel error page it should be me and same error in notification like format all other activities are giving
image

Error Page :

image

Please Look into it and Fix !

Thank you & Regards
Sanmit Sanjay Pawar
[email protected],

Redirect to intended path after Multiauth login

The current Multiauth implementation is always redirect to route('admin.home') after login.
Refer sendLoginResponse function of vendor\bitfumes\laravel-multiauth\src\Http\Controllers\LoginController.php

If we want to redirect to intended path after multiauth login. How can we do it?

I tried to change sendLoginResponse function with the lines below:
//return redirect(route('admin.home'));
return $this->authenticated($request, $this->guard()->admin())
?: redirect()->intended($this->redirectPath());

But Laravel couldn't find admin(). What should be the correct implementation?
Could you please advise? Thanks.

Getting Error While Installing Multi auth package

Hello sarthak,

Before Installing Multi auth package in fresh laravel project i have already installed laravel auth by (php artisan make:auth) command for normal user and for admin part i have use multi auth install command (composer require bitfumes/laravel-multiauth) but i got 1 error in command line please check image below
image

image

Please Help me with same !

Thank You
sanmit sanjay pawar
Email : [email protected]

Admin Model is Not Published ?

I need to add audit trail to every model so i can track each users activity but i can not add it to admin model as its not published, how can i add audit trail to admin model ?

Suggested Validation before publishing MultiAuth (custom gaurd)

MultiAuth should check below items before publishing the custom guard

  • check if Controller with same name already exist?
  • check if Views with same name already exist?
  • check if Database Factory with same name already exist?
  • check if Migration file with same table name already exist?
  • check if Model with same name already exist?
  • check if Middleware with same name already exist?
  • check if Notification with same table name already exist?

Consider a scenario:
// creating a gaurd with name user, which is by default exists
$ php artisan multiauth:make user

It will create user table migration and other related files which can be repeated or overwrites existing files..
Below is one of the output of such scenario:
image

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.