Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-adminpanel
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
laravel-adminpanel
Commits
e88004af
Commit
e88004af
authored
Oct 16, 2017
by
Viral Solani
Committed by
GitHub
Oct 16, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11 from viralsolani/analysis-Xk57m9
Apply fixes from StyleCI
parents
dab13cf3
19448c13
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
247 additions
and
241 deletions
+247
-241
ModuleController.php
app/Http/Controllers/Backend/Module/ModuleController.php
+8
-8
Generator.php
app/Http/Utilities/Generator.php
+236
-230
ModuleRepository.php
app/Repositories/Backend/Module/ModuleRepository.php
+3
-3
No files found.
app/Http/Controllers/Backend/Module/ModuleController.php
View file @
e88004af
...
...
@@ -2,18 +2,18 @@
namespace
App\Http\Controllers\Backend\Module
;
use
Illuminate\Http\Request
;
use
App\Models\Module\Module
;
use
App\Http\Utilities\Generator
;
use
App\Http\Controllers\Controller
;
use
App\Models\Access\Permission\Permission
;
use
App\Repositories\Backend\Module\ModuleRepository
;
use
App\Http\Requests\Backend\Modules\StoreModuleRequest
;
use
App\Http\Requests\Backend\Modules\CreateModuleRequest
;
use
App\Http\Requests\Backend\Modules\ManageModuleRequest
;
use
App\Http\Requests\Backend\Modules\StoreModuleRequest
;
use
App\Http\Utilities\Generator
;
use
App\Models\Access\Permission\Permission
;
use
App\Models\Module\Module
;
use
App\Repositories\Backend\Module\ModuleRepository
;
use
Illuminate\Http\Request
;
/**
* Class ModuleController
* Class ModuleController
.
*
* @author Vipul Basapati <basapativipulkumar@gmail.com | https://github.com/bvipul>
*/
...
...
@@ -82,7 +82,7 @@ class ModuleController extends Controller
$this
->
generator
->
createViewFiles
();
$this
->
generator
->
createEvents
();
//Creating the Module
$this
->
repository
->
create
(
$request
->
all
(),
$this
->
generator
->
getPermissions
()
);
$this
->
repository
->
create
(
$request
->
all
(),
$this
->
generator
->
getPermissions
()
);
return
redirect
()
->
route
(
'admin.modules.index'
)
->
withFlashSuccess
(
'Module Generated Successfully!'
);
}
...
...
app/Http/Utilities/Generator.php
View file @
e88004af
This diff is collapsed.
Click to expand it.
app/Repositories/Backend/Module/ModuleRepository.php
View file @
e88004af
...
...
@@ -58,8 +58,8 @@ class ModuleRepository extends BaseRepository
foreach
(
$permissions
as
$permission
)
{
$perm
=
[
'name'
=>
$permission
,
'display_name'
=>
title_case
(
str_replace
(
'-'
,
' '
,
$permission
)
)
.
" Permission"
'name'
=>
$permission
,
'display_name'
=>
title_case
(
str_replace
(
'-'
,
' '
,
$permission
))
.
' Permission'
,
];
//Creating Permission
$per
=
Permission
::
firstOrCreate
(
$perm
);
...
...
@@ -68,7 +68,7 @@ class ModuleRepository extends BaseRepository
$mod
=
[
'view_permission_id'
=>
"view-
$model
-permission"
,
'name'
=>
$input
[
'name'
],
'url'
=>
'admin.'
.
str_plural
(
$model
)
.
'.index'
,
'url'
=>
'admin.'
.
str_plural
(
$model
)
.
'.index'
,
'created_by'
=>
access
()
->
user
()
->
id
,
];
...
...
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