Skip to content

CheckIfAdmin when regular users and admins inside the same table #91

@schel4ok

Description

@schel4ok

By default you have this code inside App\Http\Middleware\CheckIfAdmin.php

    private function checkIfUserIsAdmin($user)
    {
        // return ($user->is_admin == 1);
        return true;
    }

I wonder what should happen when replace return true; with ($user->is_admin == 1);?
Because I don't see is_admin property in users table or User model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions