コード例 #1
0
 /**
  * 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');
 }
コード例 #2
0
ファイル: Contract.php プロジェクト: OsmelGerardoMena/vest
 public static function filterContracts($name, $product_id)
 {
     return Contract::name($name)->productid($product_id)->simplePaginate(5);
 }