1

I had this thing working well in Laravel 4.

{!! Form::open(['method'=>'delete','action'=>['ActionsController@destroy',$o->id]]) !!}

<button type="submit" class="fa fa-remove"></button>                      

{!! Form::close() !!} 

Now I get this error:

Action Barryvdh\TranslationManager\ActionsController@destroy not defined. (View:.... 

I use this route to resource, which works well for creating, editing and viewing models.

Route::resource('actions', 'ActionsController');

Can you please help me out? I have no clue how to resolve this classess problem. Worst part of the whole L5.

I thied to follow another advice from this question

Route::get('actions/{id}/destroy',['as'=>'actions.destroy','uses'=>'ActionsController@destroy']);
{!! Form::open(['method'=>'delete','action'=>'actions/'.$o->id.'/destroy']) !!}

But I still see this:

Action Barryvdh\TranslationManager\actions/23/destroy not defined. 
Community
  • 1
  • 1
Peter
  • 2,634
  • 7
  • 32
  • 46
  • i have already tried all conceivable variations, including yours which is obviously wrong as it pointts to place where Models are placed. Really appreciate your downvote. – Peter Mar 12 '15 at 13:43

1 Answers1

0

try this:

{!! Form::open(['method'=>'delete','action'=>'actions'./$o->id) !!}

<button type="submit" class="fa fa-remove"></button>                      

{!! Form::close() !!} 

the Delete method works:

/resource/{resource}