platform: 404 dashboard not found

Expected Behavior

show the dashboard page

Actual Behavior

laravel 404 , page not found (in localhost/dashboard)

Steps to Reproduce the Problem

1.php artisan serve 2.login into localhost/dashboard 3. face the error

Specifications

  • ORCHID Version:^3.0
  • Laravel Version:^5.7
  • PHP Version:7.1.3
  • Database Version:sqlite3

Other Notes

no change in routes , just php artisan orchid:install

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 22 (10 by maintainers)

Most upvoted comments

gMac:test mathewparet$ php artisan tinker
Psy Shell v0.9.9 (PHP 7.3.1 — cli) by Justin Hileman
>>> $user = App\User::find(1);
=> App\User {#3225
     id: 1,
     name: "Mathew Paret",
     email: "mathewparet@gmail.com",
     email_verified_at: null,
     created_at: "2019-02-07 16:08:00",
     updated_at: "2019-02-08 04:31:52",
     last_login: "2019-02-08 04:31:52",
     permissions: "{"platform.index": true, "platform.systems": true, "platform.bulldozer": true, "platform.systems.menu": true, "platform.systems.cache": true, "platform.systems.index": true, "platform.systems.media": true, "platform.systems.roles": true, "platform.systems.users": true, "platform.systems.backups": true, "platform.systems.category": true, "platform.systems.comments": true, "platform.systems.attachment": true, "platform.systems.announcement": true, "platform.entities.type.example-page": true, "platform.entities.type.example-post": true}",
   }
>>> $user->hasAccess("platform.index");
=> false
>>> exit
Exit:  Goodbye
gMac:test mathewparet$ 

You can show the output of the following commands:

php artisan route:list

and

php artisan tinker
>>> config('platform.domain');
>>> config('platform.prefix');

This is very strange, as you see in the user rights the specified value goes as true.

I still think that this is because of the update of the model of the User, and more precisely because of this line:

    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = [
        'email_verified_at' => 'datetime',
    ];

Because it replaces the base value:

    /**
     * @var array
     */
    protected $casts = [
        'permissions' => 'array',
    ];

Please add it now manually to your model.