本文整理汇总了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'));
}
示例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');
}
示例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);
}
示例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'));
}
示例5: down
/**
* Revert the changes to the database.
*
* @return void
*/
public function down()
{
$accounts = Account::all();
foreach ($accounts as $account) {
$account->delete();
}
}
示例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]);
}
}
}
示例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();
}
}
}
示例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();
}
}
}
示例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');
}
}
示例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();
}
示例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'));
}
示例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'));
}
示例13: index
/**
* Display a listing of branches
*
* @return Response
*/
public function index()
{
$accounts = Account::all();
return View::make('payroll.index', compact('accounts'));
}
示例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();
}
}
}
示例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'));
}