PHP code example of nazemi / laravel-appointment

1. Go to this page and download the library: Download nazemi/laravel-appointment library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nazemi / laravel-appointment example snippets


use Nazemi\Laraserve\Traits\IsRecipient;
use Nazemi\Laraserve\Traits\IsProvider;

class User extends Authenticatable
{
    use IsRecipient, IsProvider;
}

use Nazemi\Laraserve\Traits\IsRecipient;

class Patient
{
    use IsRecipient;
}

use Nazemi\Laraserve\Traits\IsProvider;

class Doctor
{
    use IsProvider;
    
}

use Nazemi\Laraserve\Facades\Laraserve;

$reservation = Laraserve::setProvider($provider)
    ->setRecipient($recipient)
    ->startTime('2023-10-01 10:00')
    ->endTime('2023-10-01 11:00')
    ->save();

use Nazemi\Laraserve\Facades\Laraserve;

$reservations = Laraserve::setProvider($provider)
    ->startTime('2023-10-01 10:00')
    ->count(5)
    ->duration(30)
    ->save();

use Nazemi\Laraserve\Models\Reservation;

$reservations = Reservation::all();

use App\Models\User;

$provider = User::find(1);
$recipient = User::find(2);

$provider->providedReservations;
$recipient->receivedReservations;
bash
php artisan vendor:publish --provider="Nazemi\Laraserve\LaraserveServiceProvider"
bash
php artisan migrate