MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

HOW TO CREATE EVENT CALENDAR IN LARAVEL? PART-2

Step 1.Create a Laravel Project

Firstly, Create a new project in laravel, so we open Git Bash,  Go to My Computer/This PC–>LocalDisk(C:)–>Xampp–>Htdocs (Press right click on Mouse)

Git Bash opened in the xampp htdocs folder from Windows File Explorer
We write down the following command on Git Bash.
Git Bash running composer create-project to install Laravel 5.8 as Event_Calendar
Git Bash output of Laravel project creation ending with Application key set successfully

Step 2. Now we move to the project directory on Git Bash, so write down the following command –>

Git Bash running cd Event_Calendar to enter the new Laravel project directory

Step 3. Install Composer Package

In this step, we have to download and install the Laravel-full calendar package for use to generate Event Calendar. So just run the following command to download and install the package.


$ composer require maddhatter/laravel-fullcalendar
Code language: JavaScript (javascript)
Composer output showing maddhatter/laravel-fullcalendar package discovered after install

Step 4. Open Project in Visual Studio

VS Code File menu with Open Folder highlighted, pointing to xampp htdocs Event_Calendar
VS Code Open Folder dialog with Event_Calendar selected in htdocs and Select Folder button marked

Step 5. Application Configuration

After successfully installed the package then we should update the application config details to use the package in our application. Here we need to add providers & aliases array details with the following details

Config/app.php in VS Code with LaravelFullcalendar ServiceProvider added to providers array
Config/app.php aliases array with Calendar facade for MaddHatter LaravelFullcalendar added

Step 5. Create Model, Controller, and Migration

Here, we need to create a Model, Controller, and Migration for Events using Laravel  composer artisan command, so first fire bellow command:

php artisan make:model Event -mcCode language: CSS (css)
Git Bash running php artisan make:model Event -mc, creating the model and events table migration

Above command, help us to create Model, Controller, and Migration for Event master. 

Step 6.  In the migration table file.

We need to add the required no of columns details for the event table like title, color, start_date, and end_date, etc.

Events migration file defining id, title, color, start_date, end_date and timestamps columns

Step 7. We need to go and update the Event model file in our application like fillable, primary key, product, etc.

Event model files present at app/Event.php path and just update with following details in it.

Event.php model in VS Code with events table and fillable title, color, start_date, end_date

Step 8. Routes Definition

We want to add new routes for showing Event Calendar. So just go to routes/web.php file and update the following routes to access data table operation in our application.

Routes/web.php with EventController routes for event page, add, edit, update and delete

Step 9. Before migrate we Update database name  in .env file  (DB_DATABASE=eventcalendar)

Laravel .env file in VS Code with DB_DATABASE set to eventcalendar

Step 10. Open Xampp and start apache and Mysql and click admin to open phpMyAdmin database

XAMPP Control Panel with Apache and MySQL running and MySQL Admin button marked for phpMyAdmin

In Part 3, we will see how to make a new controller for Event Calendar?

Click Here —https://www.devopsschool.com/blog/how-to-create-event-calendar-in-laravel-part-3/

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

55 Steps For build a project in php Laravel Framework.

1.laravel new project (open command prompt on xampp/htdocs directory) 2.cd projectname 4.Customise users table(database/migration/create_users_table.php) 5.Make Model and Migration for Role Table 6.Customise roles table(database/migration/create_roles_table.php) 7.Make Relationship between…

Read More

How to display a table in a Verticle or Horizontal form in the Laravel PHP Framework? Part-1

How to display a table in a Verticle or Horizontal form in the Laravel PHP Framework? How to Store Seed file into Database. Click There are two…

Read More

HOW TO CREATE EVENT CALENDAR IN LARAVEL? PART-3

Step 1.Create a Database in phpMyAdmin. (Write the same name of database which was written in .enf databse name). Step 2.  We use the migrate command to…

Read More

How to file upload in DB With local folder using laravel 5.8

Step:1 you have to make these(A) – php artisan make:controller ImageUploadController(B) – php artisan make:model ImageUpload -m Step:2 Open the welcome.blade.php page then write this code. Step:3…

Read More

How to Store Countries, States, Cities seed classes into the Database in Laravel PHP? (Part-3)

How to Store Countries, States, Cities seed classes into the Database in Laravel PHP Part-1 Part- 2 Step 1. Create a City seeder file. Write down the…

Read More

How to Store Countries, States, Cities seed classes into the Database in Laravel PHP? (Part-1)

How to Store Countries, States, Cities seed classes into the Database in Laravel PHP? Part- 2 Part- 3 Step 1. Create a Country seeder file. Write down…

Read More