Category

laravel 9

Category

https://www.youtube.com/watch?v=-b3j0nOuF44 Prerequisites PHP >= 8BCMath PHP ExtensionCtype PHP ExtensionFileinfo PHP extensionJSON PHP ExtensionMbstring PHP ExtensionOpenSSL PHP ExtensionPDO PHP ExtensionTokenizer PHP ExtensionXML PHP Extension Getting started Check all Prerequisites are installed in your machine. then this tutorial is already looking for you, we will create 2 user class – admin, blogger and we will make guards for 2 classes and restriction different parts of the application based on those guards. Create the applicationWe need to run…

Step 1: Install Laravel 9 Project I am going to install a laravel project using composer. composer create-project –prefer-dist laravel/laravel laravel9 Step 2: Going inside of project using the command cd laravel9 Step 3: Setup MySQL database Now, configure this database in the .env file. DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel9 DB_USERNAME=root DB_PASSWORD=root@123 Step 4: Create ajax_images Table and Model also. Here, I have created migration for ajax_images using Laravel 9 php artisan command, you can check…

Step 1: Install laravel 9 using composer composer create-project –prefer-dist laravel/laravel laravel9search Step 2: Going inside of project using the command cd laravel9search Step 3: Setup MySQL database Now, configure this database in the .env file. DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel9search DB_USERNAME=root DB_PASSWORD=root@123 Step 3: Create Migration and Model In this step, we have to create a migration for students table using Laravel 9 PHP artisan command, so first fire bellow command: php artisan make:migration create_students_table…

I am going to install a laravel project using composer. composer create-project –prefer-dist laravel/laravel laravel9 Step 2: Going inside of project using the command cd laravel9 Step 3: Setup MySQL database Now, configure this database in the .env file. DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel9 DB_USERNAME=root DB_PASSWORD=root@123 Step 4: Route Setup Here I am going to create routes to get and post method. now open “routes/web.php” file and put below code. routes/web.php use App\Http\Controllers\FormController; Route::get(‘form-submit’,[FormController::class,’form’]); Route::post(‘form-submit’,[FormController::class,’formPost’]); Step…

Step 1: Create the application We need to run command to create Laravel 9 projects. composer create-project –prefer-dist laravel/laravel laravel-8-barcode-generator Step 2: Install picqer/php-barcode-generator Package composer require picqer/php-barcode-generator Step 3: Create Route Now I am going to create route for calling controller and function. routes/web.php <?php Route::view(‘barcode’, ‘barcode’); Step 4: Create Blade file resources/views/barcode.blade.php <!DOCTYPE html> <html> <head> <title>Barcode Generator In Laravel 9 </title> <!– CSS only –> <link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css”> <!– Js only –>…

Step 1: Create a Laravel 9 project Step 2: Open laravel project set .env configuration MAIL_DRIVER=smtp MAIL_HOST=smtp.googlemail.com MAIL_PORT=465 [email protected] MAIL_PASSWORD=gmail_password MAIL_ENCRYPTION=ssl Step 2: Add Route with routes/web.php Route::get(‘send-mail’,’MailSend@mailsend’); Stage 3: Create Mail In this progression, we will make mail class SendMail for email sending. Here we will compose code for which view will call and the question of the client. So we should run cry direction. you can check inside application/Mail/SendMail.php php artisan make:mail SendMail…

Step 1: Install Composer in your system Step 2: Download laravel using composer package composer create-project –prefer-dist laravel/laravel laravel9imageupload Step 3: Configure your database in .env file DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=multipleImage DB_USERNAME=root DB_PASSWORD=root@123 Step:4 Now, run command for creating model and migration php artisan make:model File -m Update your migration field for inserting image path public function up() { Schema::create(‘files’, function (Blueprint $table) { $table->id(); $table->string(‘filenames’); $table->timestamps(); }); } Now, run migrate command. php artisan…

https://youtu.be/AeLXx2quncs Step 1: Install Laravel 9 first of all, we need to get fresh Laravel 9 version application using bellow command, So open your terminal OR command prompt and run bellow command: composer create-project laravel/laravel laravel9crud Step 2: Database Configuration Open laravel and set hostname, username, password and database name in .env file DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel_blog DB_USERNAME=root DB_PASSWORD=root Step 3: Create Migration Now we are going to create a blog. so we have to…

Laravel 9 API authentication with passport tutorial. In this tutorial, I will show you how to build rest APIs with passport authentication in Laravel 9. Also, I will show you how to install passport and configure passport in laravel 9 app. First of all, you need to follow this step. Laravel 9 API Authentication with Passport Tutorial Step 1: Install laravel 9 AppStep 2: Database Configuration in .env fileStep 3: Install Passport AuthStep 4: Passport…

How to Compare Two Dates in Laravel Carbon? eq() equalsne() not equalsgt() greater thangte() greater than or equalslt() less thanlte() less than or equals Laravel Carbon eq() equals <?php namespace App\Http\Controllers; use Carbon\Carbon; class DatesController extends Controller { /** * Write code on Method * * @return response() */ public function index() { $date1 = Carbon::createFromFormat(‘m/d/Y H:i:s’, ’12/01/2020 10:20:00′); $date2 = Carbon::createFromFormat(‘m/d/Y H:i:s’, ’12/01/2020 10:20:00′); $result = $date1->eq($date2); var_dump($result); } } Laravel Carbon ne() not…