diff --git a/app/Http/Controllers/Admin/EmployersController.php b/app/Http/Controllers/Admin/EmployersController.php index b75c168..dfbe303 100644 --- a/app/Http/Controllers/Admin/EmployersController.php +++ b/app/Http/Controllers/Admin/EmployersController.php @@ -33,7 +33,7 @@ class EmployersController extends Controller }); }*/ - $users = User::select(['users.*', 'emp.id as emp_id', 'emp.*'])->join('employers as emp','emp.user_id','users.id') + $users = User::select(['users.*','users.id as usr_id', 'emp.id as emp_id', 'emp.*'])->join('employers as emp','emp.user_id','users.id') ->where('users.is_worker', '0'); $find_key = ""; if (isset($request->find)) { diff --git a/app/Http/Controllers/PagesController.php b/app/Http/Controllers/PagesController.php index d771353..fab727e 100644 --- a/app/Http/Controllers/PagesController.php +++ b/app/Http/Controllers/PagesController.php @@ -4,6 +4,7 @@ namespace App\Http\Controllers; use App\Models\pages; use Illuminate\Http\Request; +use Illuminate\Support\Facades\Redis; class PagesController extends Controller { @@ -11,4 +12,16 @@ class PagesController extends Controller $page = pages::query()->where('slug', $pages->slug)->first(); print_r($page); } + + public function redis() { + $redis = Redis::connection(); + $redis->set('User:CompanyName', 'РЕКАМОРЕ'); + $id = 1; + //dd(Redis::get('MyVar')); + $redis->command('rpush', array("Сообщение1")); + $redis->command('rpush', array("Сообщение2")); + $values = $redis->command('lrange', array("mylist", 0, 1)); + dd($values); + + } } diff --git a/resources/views/admin/employer/index.blade.php b/resources/views/admin/employer/index.blade.php index 7ca0b58..47e679d 100644 --- a/resources/views/admin/employer/index.blade.php +++ b/resources/views/admin/employer/index.blade.php @@ -86,7 +86,7 @@ - {{ $user->name_man }} ({{ $user->emp_id }}) + {{ $user->name_man }} ({{ $user->usr_id }}) {{ $user->created_at }} @@ -97,8 +97,8 @@ @endif - @if ($user->id > 1) - is_ban) ? "checked" : "" }}/> + @if ($user->usr_id > 1) + is_ban) ? "checked" : "" }}/> @endif diff --git a/resources/views/admin/employer/index_ajax.blade.php b/resources/views/admin/employer/index_ajax.blade.php index 4b39960..ed6048f 100644 --- a/resources/views/admin/employer/index_ajax.blade.php +++ b/resources/views/admin/employer/index_ajax.blade.php @@ -40,19 +40,19 @@ - {{ $user->name_man }} + {{ $user->name_man }} ({{ $user->usr_id }}) {{ $user->created_at }} - @if ($user->id > 1) - Изменить + @if (!empty($user->emp_id)) + Изменить @endif - @if ($user->id > 1) - is_ban) ? "checked" : "" }}/> + @if ($user->usr_id > 1) + is_ban) ? "checked" : "" }}/> @endif diff --git a/routes/web.php b/routes/web.php index ea807db..25f34b2 100644 --- a/routes/web.php +++ b/routes/web.php @@ -273,3 +273,5 @@ Route::group([ Route::post('ckeditor/upload', [CKEditorController::class, 'upload'])->name('ckeditor.image-upload'); Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page'); + +Route::get('redis/', [PagesController::class, 'redis'])->name('redis');