GithubHelp home page GithubHelp logo

Comments (7)

KABBOUCHI avatar KABBOUCHI commented on August 27, 2024 2

I'll add an option to disable routes in config file and add route helper Route::novaImpersonate(); for manual use.

from nova-impersonate.

KABBOUCHI avatar KABBOUCHI commented on August 27, 2024

can u make an example? github repo?

from nova-impersonate.

preliot avatar preliot commented on August 27, 2024

routes/web.php (partially)

Route::domain(env('APP_NOVA_ADMIN_DOMAIN'))->group(static function() {

    Route::name('client.admin.')->group(static function() {

        Route::prefix(config('nova.path'))->group(static function() {

		//Route::impersonate();
				
            // Nova impersonate routes
            Route::group(['middleware' => ['web', 'auth']], static function() {
                Route::get('impersonate/user/{userId}', 'ImpersonateController@fakeUser')
                    ->name('impersonate.user');
                Route::get('impersonate/leave', 'ImpersonateController@leave')
                    ->name('impersonate.leave');
            });
        });

        //no fallback route needed, nova takes care of this
    });
});

Doesn't matter if I remove Route::impersonate(); or not. Routes are always available, which i check in the commandline with: php artisan route:list --name=impersonate.

from nova-impersonate.

KABBOUCHI avatar KABBOUCHI commented on August 27, 2024

can you test the master version? composer require kabbouchi/nova-impersonate:dev-master

I added a new config option enable_routes

from nova-impersonate.

preliot avatar preliot commented on August 27, 2024

enables_routes: works like expected. This is what i was looking for, thanks!

Route::novaImpersonate(); Gives an offset error

[2019-11-25 10:27:39] local.ERROR: Undefined offset: 0 {"exception":"[object] (ErrorException(code: 0): Undefined offset: 0 at <project>\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php:1275)

from nova-impersonate.

KABBOUCHI avatar KABBOUCHI commented on August 27, 2024

I didn't add it yet Route::novaImpersonate(), I had some trouble with it, I'll add it later.

from nova-impersonate.

preliot avatar preliot commented on August 27, 2024

I didn't add it yet Route::novaImpersonate(), I had some trouble with it, I'll add it later.

No worries, thanks for your effort!

from nova-impersonate.

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.