root@bbb-web01-dev:/var/www/html/bbb-admin-portal-web# php artisan migrate
PHP Warning: Module 'mongodb' already loaded in Unknown on line 0
Migrating: 2024_09_04_111417_moderator_department_permission_table
ErrorException : Trying to get property 'id' of non-object
at /var/www/html/bbb-admin-portal-web/database/migrations/2024_09_04_111417_moderator_department_permission_table.php:20
16| $deptCat = DB::table('permission_category')->where('name','Department')->first();
17| $teacherRole = DB::table('roles')->where('name','Teacher')->where('guard_name','conferenceuser')->whereNull('created_by')->first();
18|
19| $data = [
> 20| ['category_id'=>$deptCat->id, 'role_id'=>$teacherRole->id]
21| ];
22|
23| DB::table('role_has_category')->insert($data);
24|
Exception trace:
1 Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("Trying to get property 'id' of non-object", "/var/www/html/bbb-admin-portal-web/database/migrations/2024_09_04_111417_moderator_department_permission_table.php", [Object(stdClass)])
/var/www/html/bbb-admin-portal-web/database/migrations/2024_09_04_111417_moderator_department_permission_table.php:20
2 ModeratorDepartmentPermissionTable::up()
/var/www/html/bbb-admin-portal-web/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:392
Please use the argument -v to see more details.
Whoops\Exception\ErrorException : Module 'mongodb' already loaded
at Unknown:0
1|
Exception trace:
1 Whoops\Run::handleError("Module 'mongodb' already loaded", "Unknown")
/var/www/html/bbb-admin-portal-web/vendor/filp/whoops/src/Whoops/Run.php:514
2 Whoops\Run::handleShutdown()
[internal]:0