Support the ongoing development of Laravel.io →
Security Requests Forms
Last updated 1 year ago.
0

Use a hidden from input then check to make sure if the given id is valid.

$channel = Channel::find(Input::get('channel_id');

if (!$channel)
    throw new NotFoundHttpException ('channel not found);

if you want to restrict what users can edit the a specific channel the use filters.


Route::post('/channels',['before'=>'has_access', 'uses'=>'ChannelController@update']

Then of course you would have to define the has_access filter however you want. Check out http://laravel.com/docs/4.2/routing do figure out how to do filters.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Zianwar zianwar Joined 17 Jul 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.