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 @@
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!');
}
......
This diff is collapsed.
......@@ -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,
];
......
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