本文整理汇总了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()]);
}
示例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');
}
示例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']);
}
示例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()]);
}
示例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']);
}
示例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']);
}
示例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();
}