Laravel 9

Laravel 11 School Management System

In this tutorial, we will teach you how to create a simple school management system using Laravel 11. This lesson primarily covers student registration and student records management.

Installing Laravel 11

Create the new project which name is schoolmanagment-app.type by following command to create the Laravel project.

composer create-project laravel/laravel schoolmanagement-app

After typing the command, wait until the project installation completes. Once it’s finished, let’s proceed with the database setup.

Change .env File

By Default Database Connection in Laravel 11 as Sqllite

By Default Connection

DB_CONNECTION=sqlite
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=laravel
# DB_USERNAME=root
# DB_PASSWORD=

To change the MySQL connection, follow these steps:

  1. Set the connection type to MySQL.
  2. Enter the user credentials, including the database username and password.
  3. Specify the database name.
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=dbschoolmanagement
DB_USERNAME=root
DB_PASSWORD=

Run the Project

Run the Application using following command

php artisan serve

Create Migrations

In Laravel create the table called as Migration

Run the command to create the Migration

php artisan make:migration create_students_table

After that you can check the inside  database folder migrations  create_students_table file has been created
successfully.

Select and open the students table. add the following table fields empname,dob,phone

public function up(): void
   {
       Schema::create('students', function (Blueprint $table) {
           $table->id();
           $table->string('student_name');
           $table->date('dob');
           $table->string('address')->nullable();
           $table->string('status')->default('active');
           $table->timestamps();
       });

   }

After modified the columns names  then run the migrate command to create the tables in the databases.before the run the
command please save project then run it.

php artisan migrate

Create Controller

 

admin

Recent Posts

How to Make Admin Panel Using React MUI

I have design the Admin Basic templete using React MUI Design Admin Dashboard and Login.Here…

2 weeks ago

Install Laravel Breeze for Authentication Using Laravel 11

In this tutorial ,i am to going teach the Laravel Breeze.Laravel Breeze provides a simple…

2 weeks ago

Point of Sales (POS) System Documentation

this tutorial we will discuss about how to make the point of sales system step…

4 weeks ago

Inventory Management with Form Repeater in Laravel | Step-by-Step Tutorial

in this tutorils will explain how to make a Form Repeater in Laravel Step by…

1 month ago

Flexbox: Build Responsive Navigation Bar with HTML & CSS

Introduction to Flexbox When it comes to building responsive layouts, Flexbox offers a powerful and…

2 months ago

Creating Stunning Image Gallery Using CSS Grid

Introduction to CSS Grid The CSS Grid Layout is a powerful tool for creating responsive…

2 months ago