Blame view
app/Http/Controllers/PagesController.php
1.07 KB
486a3601d Должности и работ... |
1 2 3 |
<?php namespace App\Http\Controllers; |
5b2dcf44b Редактор страниц ... |
4 |
use App\Models\pages; |
486a3601d Должности и работ... |
5 |
use Illuminate\Http\Request; |
f0b6d25e9 Баг с id юзеров в... |
6 |
use Illuminate\Support\Facades\Redis; |
6b5dca57f Компонент для раб... |
7 8 |
use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Writer\Xlsx; |
486a3601d Должности и работ... |
9 10 11 |
class PagesController extends Controller { |
5b2dcf44b Редактор страниц ... |
12 13 14 |
public function pages(pages $pages) { $page = pages::query()->where('slug', $pages->slug)->first(); print_r($page); |
486a3601d Должности и работ... |
15 |
} |
f0b6d25e9 Баг с id юзеров в... |
16 17 18 19 20 21 22 23 24 25 26 27 |
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); } |
6b5dca57f Компонент для раб... |
28 29 30 31 32 33 34 35 36 |
public function excel() { $spreadsheet = new Spreadsheet(); $activeWorksheet = $spreadsheet->getActiveSheet(); $activeWorksheet->setCellValue('A1', 'Hello World !'); $writer = new Xlsx($spreadsheet); $writer->save('hello_world.xlsx'); } |
486a3601d Должности и работ... |
37 |
} |