コード例 #1
0
 public function update_partners()
 {
     $data = Input::all();
     $partners = new Partners();
     $partners->update_partners($data);
     return redirect('auth/partners')->with(array('success_update_partners' => 'Successfully Updated'));
 }
コード例 #2
0
 public function get()
 {
     $partners = new Partners();
     $data_partners = $partners->get_partners();
     $products = new Products();
     $sub_products = new SubProducts();
     $result_category = $products->get_category();
     foreach ($result_category as $results_category) {
         $menu_result[$results_category->category_name] = $sub_products->get_sub_category_by_category_id($results_category->id);
     }
     return view('partners', compact('result_category', 'menu_result', 'data_partners'));
 }
コード例 #3
0
ファイル: DatabaseSeeder.php プロジェクト: GorchakovAi/bubble
 public function run()
 {
     DB::table('partners')->delete();
     Partners::create(array('title' => 'Название', 'url_img' => 'test.jpg'));
     Partners::create(array('title' => 'Название', 'url_img' => 'test.jpg'));
     Partners::create(array('title' => 'Название', 'url_img' => 'test.jpg'));
     Partners::create(array('title' => 'Название', 'url_img' => 'test.jpg'));
     Partners::create(array('title' => 'Название', 'url_img' => 'test.jpg'));
     Partners::create(array('title' => 'Название', 'url_img' => 'test.jpg'));
     Partners::create(array('title' => 'Название', 'url_img' => 'test.jpg'));
     Partners::create(array('title' => 'Название', 'url_img' => 'test.jpg'));
     Partners::create(array('title' => 'Название', 'url_img' => 'test.jpg'));
 }
コード例 #4
0
 public function postRemovePartners(AddPartnersRequest $request)
 {
     Partners::find($request["id"])->delete();
     return redirect()->action('AdminController@getIndex');
 }