예제 #1
0
 /**
  * Montre la vue pour créer un article
  *
  * @return Response
  */
 public function create(Request $request)
 {
     $auth_id = Auth::user()->id;
     $categories = Category::lists('name', 'id');
     $jobs = Job::lists('name', 'id');
     return view('admin.posts.create', compact('auth_id', 'categories', 'jobs'));
 }
예제 #2
0
 public function job($id, Empcontract $contracts)
 {
     $employee = Employee::findOrFail($id);
     //$contracts::whereEmployee_id($id)->first();
     $jobs = ['' => 'Select'] + Job::lists('name', 'id')->toArray();
     $emps = ['' => 'Select'] + Empstatus::lists('name', 'id')->toArray();
     $dept = ['' => 'Select'] + CompanyStructure::lists('name', 'id')->toArray();
     return view('backend.employees.job', compact('employee', 'jobs', 'emps', 'dept', 'contracts'));
 }
예제 #3
0
 /**
  * Permet de voir la page d'édition
  *
  * @param  int $id
  * @return Response
  */
 public function edit($id)
 {
     $post = Post::find($id);
     $auth_id = Auth::user()->id;
     $categories = Category::lists('name', 'id');
     $jobs = Job::lists('name', 'id');
     $technos = Techno::orderBy('name', 'asc')->get();
     return view('admin.posts.edit', compact('auth_id', 'categories', 'jobs', 'post', 'technos'));
 }