当前位置: 首页>>代码示例>>PHP>>正文


PHP Account::all方法代码示例

本文整理汇总了PHP中Account::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Account::all方法的具体用法?PHP Account::all怎么用?PHP Account::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Account的用法示例。


在下文中一共展示了Account::all方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: create

 /**
  * Show the form for creating a new loanproduct
  *
  * @return Response
  */
 public function create()
 {
     $accounts = Account::all();
     $currencies = Currency::all();
     $charges = DB::table('charges')->where('category', '=', 'loan')->get();
     return View::make('loanproducts.create', compact('accounts', 'charges', 'currencies'));
 }
开发者ID:kenkode,项目名称:xaraerp,代码行数:12,代码来源:LoanproductsController.php

示例2: balanceSheet

 public static function balanceSheet($date)
 {
     $accounts = Account::all();
     $organization = Organization::find(1);
     $pdf = PDF::loadView('pdf.financials.balancesheet', compact('accounts', 'date', 'organization'))->setPaper('a4')->setOrientation('potrait');
     return $pdf->stream('Balance Sheet.pdf');
 }
开发者ID:kenkode,项目名称:xaraerp,代码行数:7,代码来源:Account.php

示例3: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     //
     // return Response::json(array('index' => 'cuentas 2'));
     $accounts = Account::all();
     return View::make('cuentas.index')->with('cuentas', $accounts);
 }
开发者ID:Vrian7ipx,项目名称:repocas,代码行数:12,代码来源:AccountController.php

示例4: create

 /**
  * Show the form for creating a new savingproduct
  *
  * @return Response
  */
 public function create()
 {
     $accounts = Account::all();
     $charges = Charge::all();
     $currencies = Currency::all();
     return View::make('savingproducts.create', compact('accounts', 'charges', 'currencies'));
 }
开发者ID:kenkode,项目名称:xaraerp,代码行数:12,代码来源:SavingproductsController.php

示例5: down

 /**
  * Revert the changes to the database.
  *
  * @return void
  */
 public function down()
 {
     $accounts = Account::all();
     foreach ($accounts as $account) {
         $account->delete();
     }
 }
开发者ID:angmark0309,项目名称:remarket,代码行数:12,代码来源:2013_03_13_230009_insert_accounts.php

示例6: run

 public function run()
 {
     $faker = $this->getFaker();
     $accounts = Account::all();
     foreach ($accounts as $account) {
         for ($i = 0; $i < rand(-1, 5); $i++) {
             Order::create(["account_id" => $account->id]);
         }
     }
 }
开发者ID:Basvkempen1,项目名称:simpleShop,代码行数:10,代码来源:OrderTableSeeder.php

示例7: up

 /**
  * Make changes to the database.
  *
  * @return void
  */
 public function up()
 {
     //
     $accounts = Account::all();
     foreach ($accounts as $account) {
         for ($i = 0; $i < 2; $i++) {
             $l = new Location();
             $l->address = "123 fake St.";
             $l->city = "Vancouver";
             $l->postal_code = "V8V3X4";
             $l->account_id = $account->id;
             $l->save();
         }
     }
 }
开发者ID:angmark0309,项目名称:remarket,代码行数:20,代码来源:2013_03_13_231037_insert_locations.php

示例8: up

 /**
  * Make changes to the database.
  *
  * @return void
  */
 public function up()
 {
     //
     $accounts = Account::all();
     foreach ($accounts as $account) {
         for ($i = 1; $i <= 5; $i++) {
             $location = new Location();
             $location->address = "{$i} blah St.";
             $location->city = "Vancouver";
             $location->postal_code = "v8v2v3";
             $location->account_id = $account->id;
             $location->save();
         }
     }
 }
开发者ID:angmark0309,项目名称:remarket,代码行数:20,代码来源:2013_02_27_212519_insert_locations.php

示例9: financials

 public function financials()
 {
     $report = Input::get('report_type');
     $date = Input::get('date');
     $accounts = Account::all();
     $organization = Organization::find(1);
     if ($report == 'balancesheet') {
         $pdf = PDF::loadView('pdf.financials.balancesheet', compact('accounts', 'date', 'organization'))->setPaper('a4')->setOrientation('potrait');
         return $pdf->stream('Balance Sheet.pdf');
     }
     if ($report == 'income') {
         $pdf = PDF::loadView('pdf.financials.incomestatement', compact('accounts', 'date', 'organization'))->setPaper('a4')->setOrientation('potrait');
         return $pdf->stream('Income Statement.pdf');
     }
     if ($report == 'trialbalance') {
         $pdf = PDF::loadView('pdf.financials.trialbalance', compact('accounts', 'date', 'organization'))->setPaper('a4')->setOrientation('potrait');
         return $pdf->stream('Trial Balance.pdf');
     }
 }
开发者ID:kenkode,项目名称:xpose,代码行数:19,代码来源:ReportsController.php

示例10: _seed

 /**
  * Setup data
  *
  * @return null
  */
 private static function _seed()
 {
     $database = self::_database();
     User::all()->destroy();
     Bill::all()->destroy();
     Ticket::all()->destroy();
     Tocket::all()->destroy();
     Account::all()->destroy();
     $user = new User();
     $user->id = 1;
     $user->name = "Eustaquio Rangel";
     $user->email = "eustaquiorangel@gmail.com";
     $user->code = "12345";
     $user->user_level = 1;
     $user->save();
     $user = new User();
     $user->id = 2;
     $user->name = "Rangel, Eustaquio";
     $user->email = "taq@bluefish.com.br";
     $user->code = "54321";
     $user->user_level = 2;
     $user->save();
     for ($i = 1; $i <= 10; $i++) {
         $bill = new Bill();
         $bill->id = $i;
         $bill->user_id = 1;
         $bill->description = "Bill #{$i}";
         $bill->value = $i;
         $bill->save();
         $ticket = new Ticket();
         $ticket->user_id = 1;
         $ticket->description = "Just another ticket";
         $ticket->save();
     }
     $account = new Account();
     $account->user_id = 1;
     $account->account_number = "12345";
     $account->save();
     $account = new Account();
     $account->user_id = 2;
     $account->account_number = "54321";
     $account->save();
 }
开发者ID:taq,项目名称:torm,代码行数:48,代码来源:modelTest.php

示例11: edit

 /**
  * Show the form for editing the specified paymentmethod.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $paymentmethod = Paymentmethod::find($id);
     $accounts = Account::all();
     return View::make('paymentmethods.edit', compact('paymentmethod', 'accounts'));
 }
开发者ID:kenkode,项目名称:xaraerp,代码行数:12,代码来源:PaymentmethodsController.php

示例12: create

 /**
  * Show the form for creating a new journal
  *
  * @return Response
  */
 public function create()
 {
     $accounts = Account::all();
     return View::make('journals.create', compact('accounts'));
 }
开发者ID:kenkode,项目名称:xaraerp,代码行数:10,代码来源:JournalsController.php

示例13: index

 /**
  * Display a listing of branches
  *
  * @return Response
  */
 public function index()
 {
     $accounts = Account::all();
     return View::make('payroll.index', compact('accounts'));
 }
开发者ID:kenkode,项目名称:xpose,代码行数:10,代码来源:PayrollController.php

示例14: update_later_balance

 public function update_later_balance()
 {
     $transactions = self::later_than($this)->get();
     foreach ($transactions as $key => $t) {
         $total = 0;
         $pre = self::earlier_than($t)->first();
         if (is_null($pre)) {
             $total = $t->amount;
         } else {
             $total = $t->amount + $pre->balance->total_amount;
         }
         $t->balance->total_amount = $total;
         $t->balance->save();
     }
     $accounts = Account::all();
     foreach ($accounts as $key => $account) {
         $transactions = self::later_than($this)->where_account_id($account->id)->get();
         foreach ($transactions as $key => $t) {
             $balance = 0;
             $pre = self::earlier_than($t)->where_account_id($t->account_id)->first();
             if (is_null($pre)) {
                 $balance = $t->amount;
             } else {
                 $balance = $t->amount + $pre->balance->balance_amount;
             }
             $t->balance->balance_amount = $balance;
             $t->balance->save();
         }
     }
 }
开发者ID:gigikiri,项目名称:masjid-l3,代码行数:30,代码来源:transaction.php

示例15: create

 /**
  * Show the form for creating a new stock
  *
  * @return Response
  */
 public function create()
 {
     $items = Item::all();
     $accounts = Account::all();
     return View::make('purchases.create', compact('items', 'accounts'));
 }
开发者ID:kenkode,项目名称:gasexpress,代码行数:11,代码来源:PurchasesController.php


注:本文中的Account::all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。