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


PHP Audit::store方法代码示例

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


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

示例1: store

 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     $save = $this->category->create(Input::all());
     //store the logs
     Audit::store('Settings', 'Added a new category with an id of ' . $save->id);
     return Redirect::to('/categories')->with(['flash_message' => 'Category has been saved.', 'flash_type' => 'alert-success', 'title' => 'Category list', 'categories' => $this->category->all()]);
 }
开发者ID:fagray,项目名称:fposs,代码行数:12,代码来源:CategoriesController.php

示例2: store

 /**
  * Store a newly created resource in storage.
  * POST /employees
  *
  * @return Response
  */
 public function store()
 {
     //add new employee
     $employees = $this->employee->all();
     $save = $this->employee->create(Input::all());
     //store the logs
     Audit::store('Employees', 'Added a new employee with an id of ' . $save->id);
     return Redirect::route('employees.index')->with('employees', $employees)->with('title', 'Employees')->with('flash_message', 'Employee has been added')->with('flash_type', 'alert alert-success');
 }
开发者ID:fagray,项目名称:fposs,代码行数:15,代码来源:EmployeesController.php

示例3: store

 /**
  * Store a newly created resource in storage.
  * POST /customers
  *
  * @return Response
  */
 public function store()
 {
     //save it
     $save = $this->customer->create(Input::all());
     //grab the customers data
     $customers = $this->customer->all();
     //store the logs
     Audit::store('Customers', 'Added new customer with an id of ' . $save->id);
     return Redirect::to('/customers')->with(['title' => 'Store Customers', 'customers' => $customers, 'flash_message' => 'Customer has been created.', 'flash_type' => 'alert-success']);
 }
开发者ID:fagray,项目名称:fposs,代码行数:16,代码来源:CustomersController.php

示例4: restock

 /**
  * Manual restock of stocks.
  *
  * @return Response
  */
 public function restock()
 {
     $password = Input::get('admin_password');
     if (!Auth::attempt(array('password' => $password))) {
         return array('response' => 'Invalid password', 'status' => '500');
     }
     // return Input::all();
     $this->shipment->create(Input::all());
     $stock_id = Input::get('stock_id');
     // return $stock_id;
     $qty = Input::get('qty');
     // return $stock_id;
     //update the inventory
     $this->updateInventory($stock_id, $qty);
     //store the logs
     Audit::store('Inventory', 'Manual restock of ingredient with an id of ' . $stock_id);
     return Redirect::to('/inventory')->with(['flash_message' => 'Stock has been received successfully!', 'flash_type' => 'alert-success', 'ingredients' => $this->ingredient->all()]);
 }
开发者ID:fagray,项目名称:fposs,代码行数:23,代码来源:InventoryController.php

示例5: destroy

 /**
  * Logout the user.
  * DELETE /users/{id}
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy()
 {
     $user = Auth::user()->username;
     //destroy the session
     Auth::logout();
     //store the logs
     Audit::store('Authentication', 'Logged out.');
     Session::forget('log_access');
     return Redirect::to('auth/login')->with(['title' => 'Please login', 'flash_message' => 'You have been logged out.', 'flash_type' => 'alert-info']);
 }
开发者ID:fagray,项目名称:fposs,代码行数:17,代码来源:UsersController.php

示例6: update

 /**
  * Update the specified resource in storage.
  * PUT /ingredients/{id}
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id)
 {
     $ingredient = $this->stock->findOrFail($id);
     $ingredient->fill(Input::all());
     $ingredient->save();
     $ingredients = $this->stock->all();
     //store the logs
     Audit::store('Inventory', 'Edited ingredient details  with an id of ' . $id);
     return Redirect::to('/inventory/')->with(['title' => 'Store Inventory', 'ingredients' => $ingredients, 'flash_message' => 'Ingredient has been updated successfully.', 'flash_type' => 'alert-success']);
 }
开发者ID:fagray,项目名称:fposs,代码行数:17,代码来源:IngredientsController.php

示例7: purchase

 /**
  * Purchasing process
  * 
  *
  * @return Response
  */
 public function purchase()
 {
     // return Input::all();
     //grab the item on the  temporary cart
     $temp_cart_items = $this->temp->all();
     $trans_id = Session::get('trans_id');
     $cust_id = Input::get('customer_id');
     $cashier = Input::get('cashier');
     $amount = Input::get('amount');
     $cash = Input::get('cash');
     $change = Input::get('change');
     $vat_amount = $amount * 0.12;
     // return $temp_cart_items[2]['item_id'];
     //save sold items
     $this->sale->saveSoldItems($temp_cart_items, $cust_id, $trans_id, $cashier, $amount, $cash, $change, $vat_amount);
     //update inventory
     $this->updateInventory($temp_cart_items);
     // store to the reports table
     // $this->report->saveReportData($temp_cart_items);
     //
     // //store the logs
     Audit::store('Sales', 'New purchase from a customer with an id of ' . $cust_id);
     TransactionLog::recordLog($trans_id, 'Sale completed.Invoice # ' . $trans_id, '', '', $cashier);
     //complete the sale
     return $this->completeSale();
 }
开发者ID:fagray,项目名称:fposs,代码行数:32,代码来源:SalesController.php


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