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();
 }
 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']));
 }
 public function destroy($account)
 {
     $account = Account::find($account);
     $account->delete();
     return response(['data' => true, 'status' => 'success', 'message' => 'successfully deleted']);
 }