コード例 #1
0
 public function destroy(Account $account)
 {
     if (is_integer($account)) {
         $account = Account::find($account);
     }
     $account->delete();
     Flash::success('Account has been created Deleted!');
     return Redirect::back();
 }
コード例 #2
0
 public function edit(OperationType $operationType)
 {
     $users = User::select(\DB::raw("CONCAT(surname, ' ', name) AS full_name, id"))->lists("full_name", "id");
     $currencies = Currency::select(\DB::raw("CONCAT(name, ' ', symbol) AS full_name, id"))->lists("full_name", "id");
     $accounts = Account::lists("name", "id");
     $shares = Share::select(\DB::raw("CONCAT(name, ' ', type) AS full_name, id"))->lists("full_name", "id");
     $operationTypes = OperationType::lists("name", "id");
     return View::make('Middle.Web.OperationType.edit', compact(['operationType', 'users', 'currencies', 'accounts', 'shares', 'operationTypes']));
 }
コード例 #3
0
 public function destroy($account)
 {
     $account = Account::find($account);
     $account->delete();
     return response(['data' => true, 'status' => 'success', 'message' => 'successfully deleted']);
 }