Category

Laravel

Category

Step 1: Install Laravel Project I am going to install a laravel project using composer. composer create-project –prefer-dist laravel/laravel laravel7datatables Step 2: Going inside of project using the command cd laravel7datatables 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=laravel7datatables DB_USERNAME=root DB_PASSWORD=root@123 I have done local database credentials. Now migrate database php artisan migrate Step 4: Install yajra Package We going to install the yajra/laravel-datatables-oracle package by…

Step 1: Install the laravel project using the command line. composer create-project –prefer-dist laravel/laravel laravel7ajax Step 2: Open project in code and use vs code terminal. 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 within migration file app/database/timestamp_create_books_table.php the below code here : <?php…

Laravel Pagination Add in Controller In this example the we need to pass only digit how many records need to find on same page. In this case, let’s specify that we would like to display 5 items per page: <?php namespace App\Http\Controllers; use App\Http\Controllers\Controller; use Illuminate\Support\Facades\DB; class BlogController extends Controller { public function index() { $blog = DB::table(‘blog’)->paginate(5); return view(‘blog’, [‘data’ => $blog]); } } Now view part within blog.blade.php <div class=”container”> @foreach ($data as…

https://www.youtube.com/watch?v=5cQye6YfaGI&t=2s&ab_channel=Realprogrammer Prerequisites PHP >= 7.1.3OpenSSL PHP ExtensionPDO PHP ExtensionMbstring PHP ExtensionTokenizer PHP ExtensionXML PHP ExtensionCtype PHP ExtensionJSON PHP Extension Getting started Check all Prerequisites are installed in your machine. then this tutorial is already looking for you, we will create 3 user class – admin, blogger, user and we will make guards for 3 user classes and restriction different parts of the application based on those guards. Create the applicationWe need to run command to…

Ajax Autocomplete Search in Laravel 7 Step 1: Install laravel 7 using composer composer create-project –prefer-dist laravel/laravel laravel7search Step 2: Going inside of project using the command cd laravel7search 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=laravel7search 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 7 PHP artisan command, so first fire…

Do you want to send mail using SMTP in Laravel 7? then I will give your real-time example how to send mail in Laravel 7? In this tutorial, I will guide you on how to send mail in Laravel 7. I will create blade file and dynamic information to for mail layout. let’s start from begging. Step 1: Create a Laravel 7 project laravel new laravel_sendmail Step 2: Open laravel project set .env configuration MAIL_DRIVER=smtp…

Step 1: Install Laravel 7 first of all, we need to get fresh Laravel 7 version application using bellow command, So open your terminal OR command prompt and run bellow command: laravel new laravel_blog Step 2: Database Configuration Open laravel_blog 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 create a…

Voyager image not showing First Remove from localhost from .env file and put URL your server rm public/storage then rerun the symlink code again php artisan storage:link sudo rm -r public/storage then rerun the symlink code again $ php artisan storage:link voyager.php setting: ‘storage’ => [ ‘subfolder’ => ‘public/’, // include trailing slash, like ‘my_folder/’ ], filesystem.php setting: ‘default’ => ‘local’, ‘cloud’ => ‘s3’, ‘disks’ => [ ‘local’ => [ ‘driver’ => ‘local’, ‘root’ =>…

I resolved by doing the following: Check if there is a module called rewrite.load in your apache at: cd /etc/apache2/mods-enabled/ If it does not exist execute the following excerpt: sudo a2enmod rewrite Otherwise, change the Apache configuration file to consolidate use of the “friendly URL”. sudo nano /etc/apache2/apache2.conf Find the following code inside the editor: <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> Change to: <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All…