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
03679cf1
Commit
03679cf1
authored
Oct 28, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning up the api controller
parent
69b3e023
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
74 deletions
+1
-74
MediaController.php
Http/Controllers/Api/MediaController.php
+0
-68
routes.php
Http/routes.php
+1
-6
No files found.
Http/Controllers/Api/MediaController.php
View file @
03679cf1
...
...
@@ -6,10 +6,6 @@ use Modules\Media\Services\FileService;
class
MediaController
{
/**
* @var FileRepository
*/
private
$file
;
/**
* @var FileService
*/
...
...
@@ -20,26 +16,6 @@ class MediaController
$this
->
fileService
=
$fileService
;
}
/**
* 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.
*
...
...
@@ -52,48 +28,4 @@ class MediaController
return
Response
::
json
(
$savedFile
->
toArray
());
}
/**
* 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 @
03679cf1
...
...
@@ -4,13 +4,8 @@ $router->group(['prefix' => LaravelLocalization::setLocale(), 'before' => 'Larav
{
$router
->
group
([
'prefix'
=>
Config
::
get
(
'core::core.admin-prefix'
),
'namespace'
=>
'Modules\Media\Http\Controllers'
],
function
(
$router
)
{
$router
->
resource
(
'media'
,
'Admin\MediaController'
,
[
'except'
=>
[
'show'
],
'names'
=>
[
'index'
=>
'dashboard.media.index'
,
'create'
=>
'dashboard.media.create'
,
$router
->
resource
(
'media'
,
'Admin\MediaController'
,
[
'only'
=>
[
'store'
],
'names'
=>
[
'store'
=>
'dashboard.media.store'
,
'edit'
=>
'dashboard.media.edit'
,
'update'
=>
'dashboard.media.update'
,
'destroy'
=>
'dashboard.media.destroy'
,
]]);
});
});
...
...
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