Ejemplo n.º 1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $user = User::first();
     $companies = Company::where('is_client', TRUE)->get();
     $educational_experiences = $user->resume->educational_experiences()->orderBy('starting_date', 'asc')->get();
     $languages_list = $user->resume->languages;
     $skills_list = $user->resume->skills;
     $work_experiences_list = $user->resume->work_experiences()->orderBy('starting_date', 'dsc')->get();
     $clients_list = Company::where('is_client', TRUE)->get();
     $portfolio_list = PortfolioWork::orderBy('created_at', 'dsc')->get();
     $social_medias = $user->profile->social_medias;
     return view('landing.layouts.diana._layout', compact('user', 'languages_list', 'skills_list', 'work_experiences_list', 'clients_list', 'companies', 'educational_experiences', 'social_medias', 'portfolio_list'));
 }
Ejemplo n.º 2
0
 /**
  * Send the response after the user was authenticated.
  *
  * @param  \Illuminate\Http\Request $request
  * @param  \PWebDev\Models\User $user
  * @return \Illuminate\Http\Response
  */
 protected function authenticated(Request $request, User $user)
 {
     $user->last_login = Carbon::now()->toDateTimeString();
     $user->save();
     return redirect()->intended($this->redirectPath());
 }