Laravel Appointments is a package for managing appointments in your Laravel application. It provides a simple and flexible way to handle appointment scheduling, rescheduling, and cancellations.
To install the package, use Composer:
composer require codeitamarjr/laravel-appointmentsAfter installing the package, publish the configuration file:
php artisan vendor:publish --provider="Codeitamarjr\LaravelAppointments\LaravelAppointmentServiceProvider" --tag=config
php artisan vendor:publish --provider="Codeitamarjr\LaravelAppointments\LaravelAppointmentServiceProvider" --tag=migrationsOptionally, you can publish the factories and tests:
php artisan vendor:publish --provider="Codeitamarjr\LaravelAppointments\LaravelAppointmentServiceProvider" --tag=factories
php artisan vendor:publish --tag=testsRun the migrations to create the necessary database tables:
php artisan migrateRun the database seeds to populate the database with sample data:
php artisan db:seed --class=Codeitamarjr\\LaravelAppointments\\Database\\Seeders\\EventSeederTo create an appointment, use the Appointment model:
use CodeItamarJr\LaravelAppointments\Models\Appointment;
$appointment = Appointment::create([
'user_id' => $userId,
'start_time' => '2023-10-01 10:00:00',
'end_time' => '2023-10-01 11:00:00',
'description' => 'Consultation',
]);To reschedule an appointment, update the start_time and end_time fields:
$appointment->update([
'start_time' => '2023-10-01 12:00:00',
'end_time' => '2023-10-01 13:00:00',
]);To cancel an appointment, delete the record:
$appointment->delete();You can customize the package by editing the configuration file located at config/laravel-appointments.php.
Contributions are welcome! Please submit a pull request or open an issue to discuss your ideas.
This package is open-sourced software licensed under the MIT license.