Exemple #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     $company = $this->companies->findOrFail($id);
     $company->delete();
     flash()->info('Deleted', 'Company has been deleted');
     return redirect()->route('admin.company.index');
 }
Exemple #2
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'));
 }
 /**
  * @param Company $company
  */
 public function __construct(Company $company)
 {
     $this->companiesList = $company->lists('name', 'id');
     $this->work_experiences = Auth::user()->resume->work_experiences();
 }