Support the ongoing development of Laravel.io →
Input Database
Last updated 1 year ago.
0

In a controller you are not supposed to use $table and $primaryKey variables. These are supposed to be in the models.

And for routing I suggest using named routes. For e.g.

Redirect::route('example');
Last updated 1 year ago.
0

ooh, $table and $primaryKey shouldn't be there, my mistake.

For routing I put this in my routes.php

Route::controller('countries', 'CountriesController');

And in my views I use this

{{ HTML::linkAction('CountriesController@getDelete', trans('countries.delete'), array('country_id'=>$country->country_id)) }}

What is the difference between Redirect::to and Redirect::route?

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

neonoxGER neonoxger Joined 15 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.