is parent admin

This commit is contained in:
merdiano 2019-10-04 16:58:29 +05:00
parent 4b44edccdd
commit 4041730804
3 changed files with 3 additions and 2 deletions

View File

@ -22,7 +22,7 @@ class CheckIfAdmin
*/
private function checkIfUserIsAdmin($user)
{
return ($user->is_admin == 1);
return ($user->is_parent == 1);
// return true;
}

View File

@ -121,7 +121,7 @@ class CreateUsersTable extends Migration
Schema::create('users', function ($t) {
$t->increments('id');
$t->unsignedInteger('account_id')->index();
$t->unsignedInteger('account_id')->index()->default(0);
$t->nullableTimestamps();
$t->softDeletes();

View File

@ -21,5 +21,6 @@ class DatabaseSeeder extends Seeder
$this->call('TicketStatusSeeder');
$this->call('TimezoneSeeder');
$this->call('CategoriesSeeder');
$this->call('SettingsSeeder');
}
}