Commit 4c82b883 authored by Nicolas Widart's avatar Nicolas Widart

Adding an upload media request

parent 8dc60cf6
<?php namespace Modules\Media\Http\Controllers\Api;
use Illuminate\Support\Facades\Input;
use Modules\Media\Http\Requests\UploadMediaRequest;
class MediaController
{
......@@ -27,13 +28,12 @@ class MediaController
/**
* Store a newly created resource in storage.
*
* @param UploadMediaRequest $request
* @return Response
*/
public function store()
public function store(UploadMediaRequest $request)
{
dd(Input::file('file'));
dd(Input::all());
dd('store called');
dd($request->file('file'));
}
/**
......
<?php namespace Modules\Media\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class UploadMediaRequest extends FormRequest
{
public function rules()
{
return [];
}
public function authorize()
{
return true;
}
public function messages()
{
return [];
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment