/** * Store a newly created resource in storage. * * @param Request $request * @return Response */ public function store(CreateContractRequest $request) { $contract = Contract::create($request->all()); $message = $contract->name . trans('messages.new'); Session::flash('new', $message); return redirect()->route('dashboard.contracts.index'); }
public static function filterContracts($name, $product_id) { return Contract::name($name)->productid($product_id)->simplePaginate(5); }