Category

Laravel

Category

Laravel 7 REST API with Passport Authentication Tutorial Step 1: Download laravel 7 project composer create-project –prefer-dist laravel/laravel laravelApi Go, Inside of folder cd laravelApi Step 2: Configure Your database from .env file DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel1Db DB_USERNAME=root DB_PASSWORD=root@123 Install Passport Package In this step we need to install passport via the Composer package manager, so one your terminal and fire bellow command: composer require laravel/passport After successfully install package, we require to get default…

Laravel 6 Multiple Database Connection Tutorial Step1: Install Laravel using composer composer create-project –prefer-dist laravel/laravel blog “6.*” Step 2: Configure Database from .env file DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel1Db DB_USERNAME=root DB_PASSWORD=root@123 DB_CONNECTION_SECOND=mysql2 DB_HOST_SECOND=127.0.0.1 DB_PORT_SECOND=3306 DB_DATABASE_SECOND=laravel2Db DB_USERNAME_SECOND=root DB_PASSWORD_SECOND=root@123 Step 3: Configure Database from config/database.php <?php use Illuminate\Support\Str; return [ ‘default’ => env(‘DB_CONNECTION’, ‘mysql’), ‘connections’ => [ ….. ‘mysql’ => [ ‘driver’ => ‘mysql’, ‘url’ => env(‘DATABASE_URL’), ‘host’ => env(‘DB_HOST’, ‘127.0.0.1’), ‘port’ => env(‘DB_PORT’, ‘3306’), ‘database’ => env(‘DB_DATABASE’,…

Laravel 7 Multiple Database Connection Tutorial Step1: Install Laravel using composer composer create-project –prefer-dist laravel/laravel blog “7.*” Step 2: Configure Database from .env file DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel1Db DB_USERNAME=root DB_PASSWORD=root@123 DB_CONNECTION_SECOND=mysql2 DB_HOST_SECOND=127.0.0.1 DB_PORT_SECOND=3306 DB_DATABASE_SECOND=laravel2Db DB_USERNAME_SECOND=root DB_PASSWORD_SECOND=root@123 Step 3: Configure Database from config/database.php <?php use Illuminate\Support\Str; return [ ‘default’ => env(‘DB_CONNECTION’, ‘mysql’), ‘connections’ => [ ….. ‘mysql’ => [ ‘driver’ => ‘mysql’, ‘url’ => env(‘DATABASE_URL’), ‘host’ => env(‘DB_HOST’, ‘127.0.0.1’), ‘port’ => env(‘DB_PORT’, ‘3306’), ‘database’ => env(‘DB_DATABASE’,…

How to use multiple authentication guards in Laravel 8 app https://www.youtube.com/watch?v=-b3j0nOuF44 Prerequisites PHP >= 7.3BCMath 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…

https://youtu.be/ROF-oC3GOaM Laravel 8 Ajax CRUD Example Step 1: Install the laravel project using the command line. composer create-project –prefer-dist laravel/laravel laravel8ajax Step 2: Install Yajra Datatable We going to install yajra datatable composer package for datatable. composer require yajra/laravel-datatables-oracle After that you need to set providers and alias. config/app.php ….. ‘providers’ => [ …. Yajra\DataTables\DataTablesServiceProvider::class, ] ‘aliases’ => [ …. ‘DataTables’ => Yajra\DataTables\Facades\DataTables::class, ] Open project in code and use vs code terminal. code .…

Laravel 8 Ajax Image Upload https://www.youtube.com/watch?v=N1E953_xl5s Step 1: Install Laravel 8 Project I am going to install a laravel project using composer. composer create-project –prefer-dist laravel/laravel laravel8 Step 2: Going inside of project using the command cd laravel8 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=laravel8 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 8…

Laravel 8 CRUD using ajax https://www.youtube.com/watch?v=ROF-oC3GOaM Step 1: Install the laravel project using the command line. composer create-project –prefer-dist laravel/laravel laravel8ajax Step 2: Open project in code and use vs code terminal. cd laravel8ajax code . Step 3: find .env file in root directory than setup database configuration. DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=database_name DB_USERNAME=database_username DB_PASSWORD=database_password Step 4: run Migration command php artisan make:migration create_books_table Now go to app/datatabase/migrations and open books migration file and put code…

How to send mail in Laravel 8 https://youtu.be/bt_RslTkFGc Step 1: Create a Laravel 7 project Step 2: Open laravel project set .env configuration MAIL_DRIVER=smtp MAIL_HOST=smtp.googlemail.com MAIL_PORT=465 MAIL_USERNAME=your_gmail_id@gmail.com 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…

https://www.youtube.com/watch?v=x_XPDXCQ4JU Step 1: Install Composer in your system Step 2: Download laravel using composer package composer create-project –prefer-dist laravel/laravel laravel8imageupload 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…

https://www.youtube.com/watch?v=JQNUGb5y4_E Laravel 8 CRUD Tutorial by Example Step 1: Install Laravel 8 first of all, we need to get fresh Laravel 8 version application using bellow command, So open your terminal OR command prompt and run bellow command: composer create-project laravel/laravel=8.0 laravel 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…