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')); }
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')); }
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')); }
public function postRemovePartners(AddPartnersRequest $request) { Partners::find($request["id"])->delete(); return redirect()->action('AdminController@getIndex'); }