-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade laravel to 11 and all dependencies
- Loading branch information
Showing
67 changed files
with
5,926 additions
and
4,972 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,19 @@ DB_DATABASE=kantine | |
DB_USERNAME=kantine | ||
DB_PASSWORD=password | ||
|
||
IP_ALLOW_LIST=127.0.0.1,10.0.0.0/8,mydomain.com | ||
BROADCAST_CONNECTION=reverb | ||
|
||
REVERB_APP_ID=my-app-id | ||
REVERB_APP_KEY=my-app-key | ||
REVERB_APP_SECRET=my-app-secret | ||
REVERB_HOST="localhost" | ||
REVERB_PORT=5189 | ||
REVERB_SCHEME=https | ||
REVERB_SERVER_PORT=5189 | ||
|
||
SENTRY_LARAVEL_DSN=https://[email protected]/xx | ||
SENTRY_TRACES_SAMPLE_RATE=1.0 | ||
#SENTRY_CDN=https://sentry.xxx.xxxx/cdn | ||
VITE_REVERB_APP_KEY="${REVERB_APP_KEY}" | ||
VITE_REVERB_HOST="${REVERB_HOST}" | ||
VITE_REVERB_PORT="${REVERB_PORT}" | ||
VITE_REVERB_SCHEME="${REVERB_SCHEME}" | ||
|
||
IP_ALLOW_LIST=127.0.0.1,10.0.0.0/8,mydomain.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,19 @@ DB_DATABASE=kantine | |
DB_USERNAME=kantine | ||
DB_PASSWORD=password | ||
|
||
IP_ALLOW_LIST=127.0.0.1,10.0.0.0/8,mydomain.com | ||
BROADCAST_CONNECTION=reverb | ||
|
||
REVERB_APP_ID=my-app-id | ||
REVERB_APP_KEY=my-app-key | ||
REVERB_APP_SECRET=my-app-secret | ||
REVERB_HOST="mydomain.com" | ||
REVERB_PORT=443 | ||
REVERB_SCHEME=https | ||
REVERB_SERVER_PORT=5189 | ||
|
||
SENTRY_LARAVEL_DSN=https://[email protected]/xx | ||
SENTRY_TRACES_SAMPLE_RATE=1.0 | ||
#SENTRY_CDN=https://sentry.xxx.xxxx/cdn | ||
VITE_REVERB_APP_KEY="${REVERB_APP_KEY}" | ||
VITE_REVERB_HOST="${REVERB_HOST}" | ||
VITE_REVERB_PORT="${REVERB_PORT}" | ||
VITE_REVERB_SCHEME="${REVERB_SCHEME}" | ||
|
||
IP_ALLOW_LIST=127.0.0.1,10.0.0.0/8,mydomain.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
namespace App\Console\Commands; | ||
|
||
use App\Events\DashboardRefreshEvent; | ||
use App\Events\MenuUpdatedEvent; | ||
use App\Models\Menu; | ||
use Illuminate\Console\Command; | ||
|
||
class RefreshDashboard extends Command | ||
{ | ||
/** | ||
* The name and signature of the console command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'kantine:refresh-dashboard {date?}'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Refresh dashboard page'; | ||
|
||
/** | ||
* Execute the console command. | ||
* | ||
* @return int | ||
*/ | ||
public function handle() | ||
{ | ||
if($date = $this->argument('date')) { | ||
$menu = Menu::where('date', $date)->first(); | ||
if(!$menu) { | ||
$this->error('Menu not found for date: ' . $date); | ||
return 1; | ||
} | ||
MenuUpdatedEvent::dispatch($menu); | ||
$this->info('Menu updated for date: ' . $date); | ||
} else { | ||
DashboardRefreshEvent::dispatch(); | ||
$this->info('Dashboard refreshed'); | ||
} | ||
return 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace App\Events; | ||
|
||
use Illuminate\Broadcasting\InteractsWithSockets; | ||
use Illuminate\Broadcasting\Channel; | ||
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
use Illuminate\Queue\SerializesModels; | ||
|
||
class DashboardRefreshEvent implements ShouldBroadcastNow | ||
{ | ||
use Dispatchable, InteractsWithSockets, SerializesModels; | ||
|
||
/** | ||
* Create a new event instance. | ||
*/ | ||
public function __construct() | ||
{ | ||
} | ||
|
||
/** | ||
* Get the channels the event should broadcast on. | ||
* | ||
* @return \Illuminate\Broadcasting\Channel|array | ||
*/ | ||
public function broadcastOn() | ||
{ | ||
return [ new Channel('public') ]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
namespace App\Events; | ||
|
||
use App\Models\Menu; | ||
use Illuminate\Broadcasting\InteractsWithSockets; | ||
use Illuminate\Broadcasting\Channel; | ||
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
use Illuminate\Queue\SerializesModels; | ||
|
||
class MenuUpdatedEvent implements ShouldBroadcastNow | ||
{ | ||
use Dispatchable, InteractsWithSockets, SerializesModels; | ||
|
||
/** | ||
* @var Menu | ||
*/ | ||
public $menu; | ||
|
||
/** | ||
* Create a new event instance. | ||
* | ||
* @param Menu $menu | ||
*/ | ||
public function __construct(Menu $menu) | ||
{ | ||
$this->menu = $menu; | ||
} | ||
|
||
/** | ||
* Get the channels the event should broadcast on. | ||
* | ||
* @return \Illuminate\Broadcasting\Channel|array | ||
*/ | ||
public function broadcastOn() | ||
{ | ||
return [ new Channel('public') ]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.