Passed
Push — master ( 07eb6c...4d370f )
by Reza
03:56
created
src/routes.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 
5 5
 Route::view('/', "admin::home")->name('home');
6 6
 
7
-Route::post('/logout', function (){
7
+Route::post('/logout', function() {
8 8
     auth()->logout();
9 9
     return redirect(config('easy_panel.redirect_unauthorized'));
10 10
 })->name('logout');
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
         $name = ucfirst($crud->name);
16 16
         $component = "App\\Http\\Livewire\\Admin\\$name";
17 17
 
18
-        Route::prefix($crud->route)->name("{$crud->route}.")->group(function () use ($component, $crud, $crudConfig) {
18
+        Route::prefix($crud->route)->name("{$crud->route}.")->group(function() use ($component, $crud, $crudConfig) {
19 19
 
20 20
             if (@class_exists("$component\\Read")) {
21 21
                 Route::get('/', "$component\\Read")->name('read');
@@ -26,26 +26,26 @@  discard block
 block discarded – undo
26 26
             }
27 27
 
28 28
             if (@$crudConfig->update and @class_exists("$component\\Update")) {
29
-                Route::get('/update/{' . $crud->name . '}', "$component\\Update")->name('update');
29
+                Route::get('/update/{'.$crud->name.'}', "$component\\Update")->name('update');
30 30
             }
31 31
 
32 32
         });
33 33
     }
34 34
 }
35 35
 
36
-if(config('easy_panel.todo')){
37
-    Route::prefix('todo')->name('todo.')->group(function (){
36
+if (config('easy_panel.todo')) {
37
+    Route::prefix('todo')->name('todo.')->group(function() {
38 38
         Route::get('/', \EasyPanel\Http\Livewire\Todo\Lists::class)->name('lists');
39 39
         Route::get('/create', \EasyPanel\Http\Livewire\Todo\Create::class)->name('create');
40 40
     });
41 41
 }
42 42
 
43
-Route::prefix('crud')->name('crud.')->group(function (){
43
+Route::prefix('crud')->name('crud.')->group(function() {
44 44
     Route::get('/', \EasyPanel\Http\Livewire\CRUD\Lists::class)->name('lists');
45 45
     Route::get('/create', \EasyPanel\Http\Livewire\CRUD\Create::class)->name('create');
46 46
 });
47 47
 
48
-Route::get('setLang', function (){
48
+Route::get('setLang', function() {
49 49
     $lang = request()->get('lang');
50 50
 
51 51
     session()->put('easypanel_lang', $lang);
Please login to merge, or discard this patch.
src/Http/Middleware/LangChanger.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
     {
14 14
         $lang = session()->has('easypanel_lang')
15 15
             ? session()->get('easypanel_lang')
16
-            : (config('easy_panel.lang') ?? 'en') .'_panel';
16
+            : (config('easy_panel.lang') ?? 'en').'_panel';
17 17
 
18 18
         App::setLocale($lang);
19 19
 
Please login to merge, or discard this patch.
src/Services/LangManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     {
12 12
         $files = collect(File::glob(resource_path('lang/*_panel.json')));
13 13
 
14
-        return $files->mapWithKeys(function ($file, $key){
14
+        return $files->mapWithKeys(function($file, $key) {
15 15
             preg_match('/(\w+)_panel\.json/i', $file, $m);
16 16
             $key = "$m[1]_panel";
17 17
             $value = Str::upper($m[1]);
Please login to merge, or discard this patch.