This tutorial shows how you can convert multiple pages of HTML template into Laravel by adding other methods in the controller. To start this tutorial you have to complete the Part 1 of this tutorial to know how to start template conversion in Laravel. Steps: 1. Start Apache and MySQL server. Check laravelproject that is […]
Read MoreIt is helpful for the new Laravel users to know the way of converting any static HTML template into a Laravel project and convert it into a dynamic web project. I have shown in my previous tutorials that how to convert any html template into angular project and codeigniter project. But the process of converting […]
Read MoreSimple Laravel 7 CRUD using modal is shown in the previous tutorial. DataTables is a popular Jquery plugin to work with the large list of data with pagination and search option. How you can use DataTables in Laravel 7 and implement CRUD operation are shown in this tutorial. Steps: 1. First of all you have […]
Read MoreLaravel 7 is released on 3rd March 2020. Many new features are added in this new version, such as, improved routing cache speed, improved blade components, laravel airlock etc. How you can implement CRUD using Laravel is shown in this tutorial. Steps: 1. First of all you have to install a fresh copy of laravel […]
Read MoreSteps: 1.Create a new Laravel Project. laravel new newproject 2. Go to the project folder and add laravel default authentication in your project cd newproject 3. Go to the project folder and run the following command to install laravel/ui package. composer require laravel/ui 4.Create a new database and make the database connection. 5. Run the migrate […]
Read MoreSteps: 1. Create a Controller php artisan make:controller TestController 2. Copy the bootstrap folder in laravel public directory 3. Create a master view file for application layout and add the bootstrap link. <link rel=”stylesheet” href=”/css/bootstrap.css”> <script src=”/js/jquery-2.2.4.min.js”></script> <script src=”/js/bootstrap.min.js”></script> 4. Add the following code in the master view file <body> <div class=”container”> <div class=”col-md-12″> @yield(‘content’) […]
Read MoreSteps: 1.Create a migration file for admin user. php artisan make:migration add_is_admin_to_user_table –table=users 2. Add is_admin field to user table public function up() { Schema::table(‘users’, function(Blueprint $table) { $table->boolean(‘is_admin’)->default(false); }); } public function down() { Schema::table(‘users’, function(Blueprint $table) { $table->dropColumn(‘is_admin’); }); } 3. Run the migrate command php artisan migrate 4. Create administration controller php […]
Read MoreCreate one-to-one relationship in the database using Laravel Steps: 1. Create a migration file for adding a new table profile php artisan make:migration create_table_profile 2. Add the following code in the up function Schema::create(‘profiles’, function(Blueprint $table) { $table->increments(‘id’); $table->integer(‘user_id’)->unsigned(); $table->foreign(‘user_id’)->references(‘id’)->on(‘users’)->onDelete(‘cascade’); $table->string(‘telephone’); $table->timestamps(); }); 3. Run the migrate command php artisan migrate 4. Add User Model […]
Read MoreApplying one-to-many relationship in the database using Laravel Steps 1. Create a migration file for adding a new table students php artisan make:migration create_table_students 2. Add the following code in the up function Schema::create(‘students’, function(Blueprint $table) { $table->integer(‘id’)->primary(); $table->string(‘name’); $table->text(’email’); $table->string(‘course’); $table->boolean(‘done’)->default(false); $table->timestamps(); }); 3. Create a migration file for adding a new table subjects […]
Read MoreSteps: 1. Create a MySQL database 2. Open the .env file and set the database connection 3. Run the following command to set project namespace php artisan app:name todoparrot 4. Create a model named todolist using the following command php artisan make:model Todolist 5. Open the migration folder and delete all existing file 6. Run […]
Read More