Commit 9fe50b12 authored by Nicolas Widart's avatar Nicolas Widart

Adding the api for dropzone

parent e70bf61e
<?php namespace Modules\Media\Http\Controllers\Api;
class MediaController
{
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
return \View::make('collection.index');
}
/**
* Show the form for creating a new resource.
*
* @return Response
*/
public function create()
{
return \View::make('collection.create');
}
/**
* Store a newly created resource in storage.
*
* @return Response
*/
public function store()
{
dd('store called');
}
/**
* Display the specified resource.
*
* @param int $id
* @return Response
*/
public function show($id)
{
return \View::make('collection.show');
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return Response
*/
public function edit($id)
{
return \View::make('collection.edit');
}
/**
* Update the specified resource in storage.
*
* @param int $id
* @return Response
*/
public function update($id)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
//
}
}
......@@ -14,3 +14,8 @@ $router->group(['prefix' => LaravelLocalization::setLocale(), 'before' => 'Larav
]]);
});
});
$router->group(['prefix' => 'api', 'namespace' => 'Modules\Media\Http\Controllers'], function ($router) {
$router->resource('media', 'Api\MediaController');
});
......@@ -36,9 +36,9 @@
@section('content')
<div class="row col-md-12">
<form action="/file-upload"
class="dropzone"
id="my-awesome-dropzone"></form>
<form action="{{ URL::route('api.media.store')}}" method="POST" class="dropzone" id="my-awesome-dropzone">
{!! Form::token() !!}
</form>
</div>
<div class="row">
......
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