avatar
laravel telescope PHP

Change version and requires Laravel 5.7.7+.

"require": {
    "php": ">=7.1.3",
    ...
    "laravel/framework": "5.7.7",
    ...
},

Fix error "Undefined index: name" in PackageManifest.php.

if ($this->files->exists($path = $this->vendorPath.'/composer/installed.json')) {
            // $packages = json_decode($this->files->get($path), true);
            $installed = json_decode($this->files->get($path), true);
            $packages = $installed['packages'] ?? $installed;
}

Update all vendors by composer

composer update

Install Telescope into your Laravel project

composer require laravel/telescope "^1.0" 

Publish its assets using the telescope:install and migrate command

php artisan telescope:install
php artisan migrate

Migrating: 2018_08_08_100000_create_telescope_entries_table
Migrated:  2018_08_08_100000_create_telescope_entries_table

Remove TelescopeServiceProvider::class in-app configuration file. Using the AppServiceProvider to register the service. App\Providers\TelescopeServiceProvider::class,

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(TelescopeServiceProvider::class);
    }
}

Using default URL /telescope to access Dashboard. Sometimes, we can adjust logic in Gate to limit the access Dashboard of the Telescope by file TelescopeServiceProvider.php.

protected function gate()
{
    Gate::define('viewTelescope', function ($user) {
        return in_array($user->email, [
            '[email protected]', '[email protected]'
        ]);
    });
}
24
create Laravel project with composer and specific version
You need to login to do this manipulation!