Advertisement
Guest User

Untitled

a guest
Feb 28th, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. Route::controller(
  2. 'customers' , 'customersController',
  3. array(
  4. 'getIndex' =>'customers.index',
  5. 'postUpdate'=>'customers.update'
  6. )
  7. );
  8.  
  9. <?php
  10. class customersController extends BaseController
  11. {
  12. public function getIndex()
  13. {
  14. if ( Auth::check() ){
  15. $customers = new Customers;
  16. return View::make('layouts.customers')->with('customers', $customers);
  17. }
  18. return Redirect::route('dashboard');
  19. }
  20. public function postUpdate($id)
  21. {
  22. print_r( $id);
  23. die;
  24. }
  25. }
  26.  
  27. ?>
  28.  
  29. {{ Form::model($customers,array('route' => array('customers.update', $customers->id))) }}
  30. ...
  31. {{ Form::submit('UPDATE',
  32. array('class'=>'btn btn-default btn-default-small') ) }}
  33. {{ Form::close() }}
  34.  
  35. Missing argument 1 for customersController::postUpdate()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement