%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/forge/api-takeaseat.eco-n-tech.co.uk/routes/
Upload File :
Create Path :
Current File : //home/forge/api-takeaseat.eco-n-tech.co.uk/routes/web.php

<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

if(config('app.env') == 'local') {
    Route::prefix('mailable')->name('mailable.')->group(function () {
        Route::prefix('bookings')->name('bookings.')->group(function () {
            Route::get('new', function () {
                $user = App\Models\User::find(1);
                $therapist_user = App\Models\User::find(103);
                $bookings = App\Models\Booking::orderBy('created_at', 'desc')->with('session')->take(3)->get();

                $items = [];
                foreach($bookings as $booking) {
                    $items[] = $booking;
                }

                return new App\Mail\Clients\NewBooking($user, $therapist_user, $items);
            });

            Route::get('cancelled', function () {
                $booking = App\Models\Booking::find(9);

                return new App\Mail\Clients\CancelledBooking($booking);
            });
        });
    });
}

Zerion Mini Shell 1.0