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.
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.
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:
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=dbschoolmanagement DB_USERNAME=root DB_PASSWORD=
Run the Application using following command
php artisan serve
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
I have design the Admin Basic templete using React MUI Design Admin Dashboard and Login.Here…
In this tutorial ,i am to going teach the Laravel Breeze.Laravel Breeze provides a simple…
this tutorial we will discuss about how to make the point of sales system step…
in this tutorils will explain how to make a Form Repeater in Laravel Step by…
Introduction to Flexbox When it comes to building responsive layouts, Flexbox offers a powerful and…
Introduction to CSS Grid The CSS Grid Layout is a powerful tool for creating responsive…