Send data to a partial theme view

Laraship QuestionsCategory: TechnicalSend data to a partial theme view
ATMA asked 3 years ago
How can I send a data to a partial theme view? I create a new column in User table call "first_time_login" (boolean). So I have this code below:
$first_time_login = false;
if (Auth::user()->first_time_login) {
$first_time_login = true;
Auth::user()->first_time_login = 1;
return view('corals-elite-admin::partials.header', ['first_time_login' => $first_time_login]);
  I want put this code in some Controller (that I donĀ“t know what) for then to call or send the $first_time_login variable to run in partial.heder view. I'm using a custom module "Quiz::"
1 Answers
laraship Staff answered 3 years ago
Hello, We dont see a new to pass this variable as its a field for user entity where it will be available anywhere in the views, you just need to use user()->first_time_login to return the value anywhere.  
Helinho replied 3 years ago

Thanks for the feedback, but:
1) how can I perform any function or action if corals-elite-admin theme doesn’t have a controller inside the folder?
2) where and what controller do I do this?
3) can you show me a simple example of a function being sent to this theme from a controller?