Commit e88004af authored by Viral Solani's avatar Viral Solani Committed by GitHub

Merge pull request #11 from viralsolani/analysis-Xk57m9

Apply fixes from StyleCI
parents dab13cf3 19448c13
...@@ -2,18 +2,18 @@ ...@@ -2,18 +2,18 @@
namespace App\Http\Controllers\Backend\Module; 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\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\CreateModuleRequest;
use App\Http\Requests\Backend\Modules\ManageModuleRequest; 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> * @author Vipul Basapati <basapativipulkumar@gmail.com | https://github.com/bvipul>
*/ */
...@@ -82,7 +82,7 @@ class ModuleController extends Controller ...@@ -82,7 +82,7 @@ class ModuleController extends Controller
$this->generator->createViewFiles(); $this->generator->createViewFiles();
$this->generator->createEvents(); $this->generator->createEvents();
//Creating the Module //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!'); return redirect()->route('admin.modules.index')->withFlashSuccess('Module Generated Successfully!');
} }
......
This diff is collapsed.
...@@ -59,7 +59,7 @@ class ModuleRepository extends BaseRepository ...@@ -59,7 +59,7 @@ class ModuleRepository extends BaseRepository
foreach ($permissions as $permission) { foreach ($permissions as $permission) {
$perm = [ $perm = [
'name' => $permission, 'name' => $permission,
'display_name' => title_case( str_replace( '-', ' ', $permission ) ) . " Permission" 'display_name' => title_case(str_replace('-', ' ', $permission)).' Permission',
]; ];
//Creating Permission //Creating Permission
$per = Permission::firstOrCreate($perm); $per = Permission::firstOrCreate($perm);
...@@ -68,7 +68,7 @@ class ModuleRepository extends BaseRepository ...@@ -68,7 +68,7 @@ class ModuleRepository extends BaseRepository
$mod = [ $mod = [
'view_permission_id' => "view-$model-permission", 'view_permission_id' => "view-$model-permission",
'name' => $input['name'], 'name' => $input['name'],
'url' => 'admin.' . str_plural( $model ) . '.index', 'url' => 'admin.'.str_plural($model).'.index',
'created_by' => access()->user()->id, 'created_by' => access()->user()->id,
]; ];
......
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