Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
9fe50b12
Commit
9fe50b12
authored
Oct 27, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding the api for dropzone
parent
e70bf61e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
3 deletions
+86
-3
MediaController.php
Http/Controllers/Api/MediaController.php
+78
-0
routes.php
Http/routes.php
+5
-0
index.blade.php
Resources/views/admin/index.blade.php
+3
-3
No files found.
Http/Controllers/Api/MediaController.php
0 → 100644
View file @
9fe50b12
<?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
)
{
//
}
}
Http/routes.php
View file @
9fe50b12
...
...
@@ -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'
);
});
Resources/views/admin/index.blade.php
View file @
9fe50b12
...
...
@@ -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
">
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment