コード例 #1
0
 public function show($id)
 {
     $invoice = Invoice::getInvoiceDetails($id);
     $items = Item::all();
     // print_r($items);
     return view('invoice', ['invoice' => $invoice, 'id' => $id, 'items' => $items->getArray()]);
 }
コード例 #2
0
ファイル: InvoiceController.php プロジェクト: GobleB/POS-CRUD
 /**
  * Add or Edit Form
  */
 public function invoiceProfile($invoice_id)
 {
     // Validation Rules
     $validator = Validator::make(['invoice_id' => $invoice_id], ['invoice_id' => 'integer']);
     // If Validation Fails
     if ($validator->fails()) {
         return redirect('/customers')->withErrors($validator->messages()->toArray());
     }
     // Get the invoice model
     $invoice = new Invoice($invoice_id);
     // Invoice Items as an array
     $items = $invoice->getItems();
     // All Items Collection
     $all_items = Item::all();
     // Return the Invoice Profile View
     return view('invoices.profile', ['invoice' => $invoice, 'items' => $items->getArray(), 'all_items' => $all_items->getArray()]);
 }
コード例 #3
0
ファイル: ItemController1.php プロジェクト: cdandy/meta-admin
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $item = Item::all();
     // var_dump($item);exit;
     return view('admin.item.index', ['item' => $item]);
 }
コード例 #4
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $items = Item::all();
     return \View::make('list_item', compact('items'));
 }
コード例 #5
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function showAll()
 {
     $items = \App\Models\Item::all();
     return view('toDo', ['items' => $items]);
 }
コード例 #6
0
 public function items()
 {
     $items = \App\Models\Item::all();
     return \View::make('items')->with('items', $items);
 }
コード例 #7
0
ファイル: routes.php プロジェクト: leanne-abarro/toDo
<?php

/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', function () {
    $items = \App\Models\Item::all();
    return $items;
});
// ===== items route =====
Route::get('toDo', 'ItemsController@showForm');
Route::get('toDo', 'ItemsController@showAll');
Route::resource('items', 'ItemsController');
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/
Route::group(['middleware' => ['web']], function () {
コード例 #8
0
ファイル: routes.php プロジェクト: emsdog/lumen-todo
<?php

// Home route to show all tasks
$app->get('/', function () {
    return view('list')->with('items', \App\Models\Item::all());
});
// Add a task
$app->post('/task/add', ['as' => 'task.add', 'uses' => 'App\\Http\\Controllers\\ListController@add']);
// Check a task as complete
$app->post('/task/check', ['as' => 'task.check', 'uses' => 'App\\Http\\Controllers\\ListController@check']);
// Uncheck a task
$app->post('/task/uncheck', ['as' => 'task.uncheck', 'uses' => 'App\\Http\\Controllers\\ListController@unCheck']);
// Remove a task
$app->post('/task/remove', ['as' => 'task.remove', 'uses' => 'App\\Http\\Controllers\\ListController@remove']);
コード例 #9
0
 public function showAll()
 {
     $items = Item::all();
     return view('item_all', ['items' => $items->getArray()]);
 }
コード例 #10
0
ファイル: TestController.php プロジェクト: suchayj/easymanage
 public function index()
 {
     return Item::all()->toArray();
 }
コード例 #11
0
ファイル: ItemController.php プロジェクト: cdandy/artup
 /**
  * 查看商品
  * 
  */
 public function index()
 {
     $item = Item::all();
     return view('item.index', ['item' => $item]);
 }