authenticationlaravel-5laravel-5.3laravel-middlewareilluminate-container

How to allow full access multiple url segments in Larvel5.3.19


I'm create file upload with CKeditor4.5 with Larvel5.3.19 this task I want to know is it possible to allow Larvel url for fully accessing multiple url segments example.

http://web.dev/browser/browse.php?CKEditor=textarea&CKEditorFuncNum=1&langCode=en

RO

http://web.dev/browser/imgupload/CKEditor/textarea2/CKEditorFuncNum/1/langCode/en


Solution

  • For the first options you can access the parameters using Illuminate\Http\Request Requests in your controller method.

    $textarea = $request->input('textarea');
    

    For the second option you can do

    Route::get(' browser/imgupload/CKEditor/{fields}', ['as'=>'cke.upload','uses'=>'CKEController@imgUpload'])
            ->where('fields', '.*');
    

    You can then use preg_split("#/#", $fields) to access the parameters in your controller method.