From Cream Iguana, 2 Months ago, written in Plain Text.
- go back
Embed
Viewing differences between and php artision logs
  1. root@bbb-web01-dev:/var/www/html/bbb-admin-portal-web# php artisan migrate
  2. PHP Warning:  Module 'mongodb' already loaded in Unknown on line 0
  3. Migrating: 2024_09_04_111417_moderator_department_permission_table
  4.  
  5.    ErrorException  : Trying to get property 'id' of non-object
  6.  
  7.   at /var/www/html/bbb-admin-portal-web/database/migrations/2024_09_04_111417_moderator_department_permission_table.php:20
  8.     16|         $deptCat = DB::table('permission_category')->where('name','Department')->first();
  9.     17|         $teacherRole = DB::table('roles')->where('name','Teacher')->where('guard_name','conferenceuser')->whereNull('created_by')->first();
  10.     18|        
  11.     19|         $data = [
  12.   > 20|                         ['category_id'=>$deptCat->id, 'role_id'=>$teacherRole->id]
  13.     21|                             ];
  14.     22|        
  15.     23|         DB::table('role_has_category')->insert($data);
  16.     24|
  17.  
  18.   Exception trace:
  19.  
  20.   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)])
  21.       /var/www/html/bbb-admin-portal-web/database/migrations/2024_09_04_111417_moderator_department_permission_table.php:20
  22.  
  23.   2   ModeratorDepartmentPermissionTable::up()
  24.       /var/www/html/bbb-admin-portal-web/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:392
  25.  
  26.   Please use the argument -v to see more details.
  27.  
  28.    Whoops\Exception\ErrorException  : Module 'mongodb' already loaded
  29.  
  30.   at Unknown:0
  31.     1|
  32.  
  33.   Exception trace:
  34.  
  35.   1   Whoops\Run::handleError("Module 'mongodb' already loaded", "Unknown")
  36.       /var/www/html/bbb-admin-portal-web/vendor/filp/whoops/src/Whoops/Run.php:514
  37.  
  38.   2   Whoops\Run::handleShutdown()
  39.       [internal]:0
  40.