Laravel以admin和普通用户的身份传递值

I have a site where an admin can register themselves. Currently there is only one admin so the functions below works for passing the value:

public function getAllVideos()
{
    $videos = Video::all();
    $price = DB::table('donor')->sum('amount_donated');
    $goal = auth()->user()->goal;

    return view('adminmanagement', compact('videos', 'price', 'goal'));
}

public function changeGoal(Request $data)
{
    auth()->user()->update([
        'goal' => $data->input('newGoal')
    ]);

    return redirect('/home');
}

And if I need to just pass it to a view where a normal user can see, do I do the following?

public function getAllVideos()
    {
        $videos = Video::all();
        $price = DB::table('donor')->sum('amount_donated');

User::first()->goal;

        return view('adminmanagement', compact('videos', 'price', 'goal'));
    }

    public function changeGoal(Request $data)
    {
        auth()->user()->update([
            'goal' => $data->input('newGoal')
        ]);

        return redirect('/normalview');
    }

But what if there are more than one registered users (admin) in the system. Would it still be fine as only one admin is logged in at a time? Or does the code need to change?

EDIT: I have registration only for admins (which are 'user'), the normal users ( which are 'donors' in my case) don't have any registration/logging needed. So my main purpose is to be able to pass that $goal value to two different pages. One accessbile to admin(let's say a registered and logged in admin named jon), and other accessible to the normal user. so my current code 'User::first()->goal;' should do the trick, right? but, will it be fine if lets say, another admin named jim registers and logs in. So now the admin that is logged in is jim, not jon will it still display the $goal value in the admin's view page(accessed by jim) and normal user's view page(accessed by a normal/random person)?

From your other question you said that there's only one user and it's an admin. In that case you could replace the auth()->user() with User::first(). But if you have more than one admin or users, you need to specify the user using User::find(1) with the user id. Every user has a goal field and i assume you want to fetch only the goal from the admin user with the actual value. If so you can do this.

Replace

$goal = auth()->user()->goal;

With

$goal = User::find(1)->goal;

Make sure to use the user id of the user with the goal value.

retrieving user via auth()->user() Or Auth::user()(I prefer the second way) only return the current logged user.

If you write : Auth::user()->username it will display their own name to all user viewing this page.

No need to worry :)

However, User::first() will get the first reccord in the users table so it will always be the same user and it may be a normal user