@@ -8,7 +8,6 @@ |
||
| 8 | 8 | use Afrittella\BackProject\Models\Observers\SaveFileWhenAddingAttachment; |
| 9 | 9 | use Illuminate\Support\ServiceProvider; |
| 10 | 10 | use Illuminate\Routing\Router; |
| 11 | -use Route; |
|
| 12 | 11 | use function Symfony\Component\HttpKernel\Tests\controller_func; |
| 13 | 12 | |
| 14 | 13 | class BackProjectServiceProvider extends ServiceProvider |
@@ -34,13 +34,13 @@ discard block |
||
| 34 | 34 | // - first the published views (in case they have any changes) |
| 35 | 35 | $this->loadViewsFrom(resource_path('views/vendor/back-project/base'), 'back-project'); |
| 36 | 36 | // - then the stock views that come with the package, in case a published view might be missing |
| 37 | - $this->loadViewsFrom(__DIR__ . '/../resources/views', 'back-project'); |
|
| 37 | + $this->loadViewsFrom(__DIR__.'/../resources/views', 'back-project'); |
|
| 38 | 38 | // Load Translations |
| 39 | - $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'back-project'); |
|
| 39 | + $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'back-project'); |
|
| 40 | 40 | |
| 41 | 41 | // use the vendor configuration file as fallback |
| 42 | 42 | $this->mergeConfigFrom( |
| 43 | - __DIR__ . '/../config/config.php', 'back-project' |
|
| 43 | + __DIR__.'/../config/config.php', 'back-project' |
|
| 44 | 44 | ); |
| 45 | 45 | |
| 46 | 46 | $this->routes($router); |
@@ -64,11 +64,11 @@ discard block |
||
| 64 | 64 | return new BackProject($app); |
| 65 | 65 | });*/ |
| 66 | 66 | |
| 67 | - $this->app->singleton('attachments-manager', function ($app) { |
|
| 67 | + $this->app->singleton('attachments-manager', function($app) { |
|
| 68 | 68 | return new MediaManager(); |
| 69 | 69 | }); |
| 70 | 70 | |
| 71 | - $this->app->singleton('back-project', function ($app) { |
|
| 71 | + $this->app->singleton('back-project', function($app) { |
|
| 72 | 72 | return new BackProject(); |
| 73 | 73 | }); |
| 74 | 74 | |
@@ -105,15 +105,15 @@ discard block |
||
| 105 | 105 | public function publishFiles() |
| 106 | 106 | { |
| 107 | 107 | // publish config file |
| 108 | - $this->publishes([__DIR__ . '/../config/config.php' => config_path() . '/back-project.php'], 'config'); |
|
| 108 | + $this->publishes([__DIR__.'/../config/config.php' => config_path().'/back-project.php'], 'config'); |
|
| 109 | 109 | // publish lang files |
| 110 | - $this->publishes([__DIR__ . '/../resources/lang' => resource_path('lang/vendor/back-project')], 'lang'); |
|
| 110 | + $this->publishes([__DIR__.'/../resources/lang' => resource_path('lang/vendor/back-project')], 'lang'); |
|
| 111 | 111 | // publish public Backpack assets |
| 112 | - $this->publishes([__DIR__ . '/../public' => public_path('vendor/back-project')], 'public'); |
|
| 112 | + $this->publishes([__DIR__.'/../public' => public_path('vendor/back-project')], 'public'); |
|
| 113 | 113 | // publish views |
| 114 | - $this->publishes([__DIR__ . '/../resources/views' => resource_path('views/vendor/back-project')], 'views'); |
|
| 114 | + $this->publishes([__DIR__.'/../resources/views' => resource_path('views/vendor/back-project')], 'views'); |
|
| 115 | 115 | // publish error views |
| 116 | - $this->publishes([__DIR__ . '/../resources/error_views' => resource_path('views/errors')], 'errors'); |
|
| 116 | + $this->publishes([__DIR__.'/../resources/error_views' => resource_path('views/errors')], 'errors'); |
|
| 117 | 117 | // publish public AdminLTE assets |
| 118 | 118 | $this->publishes(['vendor/almasaeed2010/adminlte/bootstrap' => public_path('vendor/adminlte/bootstrap')], 'adminlte'); |
| 119 | 119 | $this->publishes(['vendor/almasaeed2010/adminlte/dist' => public_path('vendor/adminlte/dist')], 'adminlte'); |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | //$router->aliasMiddleware('guest', \Afrittella\BackProject\Http\Middleware\RedirectIfAuthenticated::class); |
| 129 | 129 | $router->aliasMiddleware('role', \Afrittella\BackProject\Http\Middleware\Role::class); |
| 130 | 130 | |
| 131 | - $this->loadRoutesFrom(__DIR__ . '/../routes/web.php'); |
|
| 131 | + $this->loadRoutesFrom(__DIR__.'/../routes/web.php'); |
|
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | public function handleMigrations() |
@@ -138,8 +138,8 @@ discard block |
||
| 138 | 138 | $timestamp = date('Y_m_d_His', time()); |
| 139 | 139 | |
| 140 | 140 | $this->publishes([ |
| 141 | - __DIR__ . '/../database/migrations/' . $file . '.php' => |
|
| 142 | - database_path('migrations/' . $timestamp . '_' . $file . '.php') |
|
| 141 | + __DIR__.'/../database/migrations/'.$file.'.php' => |
|
| 142 | + database_path('migrations/'.$timestamp.'_'.$file.'.php') |
|
| 143 | 143 | ], 'migrations'); |
| 144 | 144 | } |
| 145 | 145 | } |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | public function loadHelpers() |
| 180 | 180 | { |
| 181 | 181 | foreach ($this->helpers as $helper): |
| 182 | - $file = __DIR__ . '/Helpers/' . $helper . '.php'; |
|
| 182 | + $file = __DIR__.'/Helpers/'.$helper.'.php'; |
|
| 183 | 183 | |
| 184 | 184 | if (file_exists($file)) { |
| 185 | 185 | require_once($file); |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | use Afrittella\BackProject\Models\Menu; |
| 4 | 4 | use Afrittella\BackProject\Models\Role; |
| 5 | 5 | use Afrittella\BackProject\Models\Permission; |
| 6 | - |
|
| 7 | 6 | use Illuminate\Console\Command; |
| 8 | 7 | use Illuminate\Support\Facades\DB; |
| 9 | 8 | |
@@ -2,8 +2,6 @@ |
||
| 2 | 2 | namespace Afrittella\BackProject\Console\Commands; |
| 3 | 3 | |
| 4 | 4 | use Illuminate\Console\Command; |
| 5 | -use Illuminate\Support\Facades\DB; |
|
| 6 | - |
|
| 7 | 5 | use Afrittella\BackProject\Models\Role; |
| 8 | 6 | |
| 9 | 7 | class SeedPermissions extends Command |
@@ -5,10 +5,8 @@ |
||
| 5 | 5 | use Illuminate\Broadcasting\Channel; |
| 6 | 6 | use Illuminate\Queue\SerializesModels; |
| 7 | 7 | use Illuminate\Broadcasting\PrivateChannel; |
| 8 | -use Illuminate\Broadcasting\PresenceChannel; |
|
| 9 | 8 | use Illuminate\Foundation\Events\Dispatchable; |
| 10 | 9 | use Illuminate\Broadcasting\InteractsWithSockets; |
| 11 | -use Illuminate\Contracts\Broadcasting\ShouldBroadcast; |
|
| 12 | 10 | |
| 13 | 11 | class UserRegistered |
| 14 | 12 | { |
@@ -2,14 +2,11 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Afrittella\BackProject\Http\Controllers; |
| 4 | 4 | |
| 5 | -use Afrittella\BackProject\Exceptions\NotFoundException; |
|
| 6 | -use Afrittella\BackProject\Facades\MediaManager; |
|
| 7 | 5 | use Afrittella\BackProject\Http\Requests\AttachmentAdd; |
| 8 | 6 | use Afrittella\BackProject\Repositories\Attachments; |
| 9 | 7 | use Afrittella\BackProject\Repositories\Criteria\Attachments\ByUser; |
| 10 | 8 | use Illuminate\Http\Request; |
| 11 | 9 | use Illuminate\Support\Facades\Auth; |
| 12 | -use Illuminate\Support\Facades\Storage; |
|
| 13 | 10 | use Prologue\Alerts\Facades\Alert; |
| 14 | 11 | |
| 15 | 12 | class AttachmentsController extends Controller |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | namespace Afrittella\BackProject\Http\Controllers\Auth; |
| 3 | 3 | |
| 4 | 4 | use Afrittella\BackProject\Http\Controllers\Controller; |
| 5 | - |
|
| 6 | 5 | use Illuminate\Foundation\Auth\SendsPasswordResetEmails; |
| 7 | 6 | |
| 8 | 7 | class ForgotPasswordController extends Controller |
@@ -2,13 +2,10 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Afrittella\BackProject\Http\Controllers; |
| 4 | 4 | |
| 5 | -use Afrittella\BackProject\Facades\MediaManager; |
|
| 6 | 5 | use Afrittella\BackProject\Repositories\Attachments; |
| 7 | 6 | use Afrittella\BackProject\Repositories\Criteria\Attachments\All; |
| 8 | -use Afrittella\BackProject\Repositories\Criteria\Attachments\ByUser; |
|
| 9 | 7 | use Illuminate\Http\Request; |
| 10 | 8 | use Illuminate\Support\Facades\Auth; |
| 11 | -use Illuminate\Support\Facades\Storage; |
|
| 12 | 9 | use Prologue\Alerts\Facades\Alert; |
| 13 | 10 | |
| 14 | 11 | class MediaController extends Controller |
@@ -6,7 +6,6 @@ |
||
| 6 | 6 | use Afrittella\BackProject\Http\Requests\PermissionEdit; |
| 7 | 7 | use Afrittella\BackProject\Repositories\Permissions; |
| 8 | 8 | use Afrittella\BackProject\Repositories\Roles; |
| 9 | -use Illuminate\Http\Request; |
|
| 10 | 9 | use Prologue\Alerts\Facades\Alert; |
| 11 | 10 | |
| 12 | 11 | class PermissionsController extends Controller |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | |
| 43 | 43 | public function store(PermissionAdd $request, Permissions $permissions) |
| 44 | 44 | { |
| 45 | - $permission= $permissions->create($request->all()); |
|
| 45 | + $permission = $permissions->create($request->all()); |
|
| 46 | 46 | |
| 47 | 47 | Alert::add('success', trans('back-project::crud.model_created', ['model' => trans('back-project::permissions.permission')]))->flash(); |
| 48 | 48 | |
@@ -6,7 +6,6 @@ |
||
| 6 | 6 | use Afrittella\BackProject\Http\Requests\RoleEdit; |
| 7 | 7 | use Afrittella\BackProject\Repositories\Permissions; |
| 8 | 8 | use Afrittella\BackProject\Repositories\Roles; |
| 9 | -use Illuminate\Http\Request; |
|
| 10 | 9 | use Prologue\Alerts\Facades\Alert; |
| 11 | 10 | |
| 12 | 11 | class RolesController extends Controller |
@@ -37,12 +37,12 @@ |
||
| 37 | 37 | |
| 38 | 38 | public function create(Permissions $permissions) |
| 39 | 39 | { |
| 40 | - return view('back-project::roles.create')->with('permissions', $permissions->all()); |
|
| 40 | + return view('back-project::roles.create')->with('permissions', $permissions->all()); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | public function store(RoleAdd $request, Roles $roles) |
| 44 | 44 | { |
| 45 | - $role= $roles->create($request->all()); |
|
| 45 | + $role = $roles->create($request->all()); |
|
| 46 | 46 | |
| 47 | 47 | Alert::add('success', trans('back-project::crud.model_created', ['model' => trans('back-project::roles.role')]))->flash(); |
| 48 | 48 | |