Migration in Laravel.
Migrations are like version control for our database. Means we don’t have to worry about versions of the database and laravel because it interacts with the database…
How to include sub-views in Laravel.
First of all, we make a new directory in the view folder in which our subviews files are stored. To make subviews we use below function. @include(address_of_subviews_file)…
Conditional (@if, @else, @elseif, @isset, @empty, and @unless) Statements in Laravel.
First of all, we make a condition.blade.php file in which we define our conditions. See the below image. After that, we make a function named condition in…
How to check variable is declared or not in Laravel to avoid an Error.
Suppose we have not declared a variable in the controller and calling it in views, then it shows undefined variable Error. See the below image. Suppose, we…
[SOLVED] Error: Access CSS/js file in Local and Laravel-development Server both.
In Laravel, our all assets are in the public directory, But it gives error while we run Same code in Laravel development server and Local Server. See…
Master/fixed layout in Laravel.
@yield(“Parameter”) :- It is a section which requires to be filled in by your view which extends the layout. You could pass it a default value through the second…
How to pass data to views in Laravel.
There are 4 ways to send data to view:- 1. Using an array function : array()2. Using compact function : compact()3. Using with : with([]) 4. Using…
How to Install and create a project in Laravel for Windows User!
Before installing Laravel Composer, ensure that you have installed Xampp Server and Git-Bash. If not installed then go to this link and install:- xampp:- https://www.apachefriends.org/download.htmlGit-bash:- https://gitforwindows.org/ After…
Sending Email with attachments in Laravel 5.5 using and PHP & JQuery
Introduction: Hello Dear Reader,In this post, I am going to demonstrate detailed steps of how to send email to user’s email id with the files that were…
How to Use Middleware In Laravel.
step:1– first, you have go this path: C:\xampp\htdocs. then you have right-click on the git base here. same as this pic. Step:2- write any project name like…
Protection of CSRF in Laravel
What is CSRF? CSRF stands for Cross Site Request Forgery and it’s a web attack that forces a user to make unintended requests to a web application where they are previously…
Laravel 5.5 php artisan migrate error in Ubuntu: SQLSTATE[HY000] [2002] Connection refused
How I got this error?Ans: I was running php artisan migrate command in /opt/lampp/htdocs/project_dir What was the error? ubuntu@ip-ip_addr:/opt/lampp/htdocs/project_dir$ php artisan migrateIn Connection.php line 664: SQLSTATE[HY000] [2002]…
How to clear laravel.log in PHP Laravel
laravel.log is a file that collects all the Log messages by default into it Sometimes you need to truncate this log file for troubleshooting the application Command…
How to store and retrieve image from the database in Laravel.
# Creating Migration For Uploading Image We need to add three lines in our migration file which makes column in our Database .After adding, run Migration ….
Top 10 Laravel Interview Questions And Answers 2020.
1- What is Laravel Framework? Laravel is a free, open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the model–view–controller…
How to use multiple authentication in Laravel.
Step:1 Step:2- click on Git base Here. It will look like this Step:3- you have to crate own project and put here Step:4- Press Enter than project…
Generate URLs to Named Routes in Laravel
Laravel Provides several helpers to assist you in generating URLs for your application. These are mainly helpful when building links in your templates and API responses, or…
Laravel – Remove Public from URL using htaccess
Step 1: Rename File In first step it is very easy and you need to just rename file name. you have to rename server.php to index.php at…
Introduction of Some keyword using laravel
Laravel framework provides three primary tools for interaction through command-line namely: Artisan, explains about Artisan in detail. Introduction to Artisan Artisan is the command-line interface frequently used in…
How to Upload files or Documents in Mysql Database Using laravel.
Step: 1- First of all you have to go:- Step:2- then right-click in this Drive and got to Git Bas Here and click. Step:3-run the composer step:…
Exploring Directory Structure in laravel.
Laravel applications follow the Model-View-Controller architecture design pattern. Models represent the entities in the database and help you to query the database and return the data Views are the pages that…
Best Laravel Packages to create awesome Admin Panels & other functionalities.
Here i am going to discuss about most trending and awesome packages for Laravel Developers. with these packages, you can easily embed some cool features like captcha,…
How to login & Registration with Session in laravel.
After successfully install laravel Application, Go to your project .env file and set up database credential and move next step : Next, migrate the table into the…
How to install Laravel Application & sample CRUD.
Since its initial release in 2011, Laravel has experienced exponential growth. In 2015, it became the most starred PHP framework on GitHub and rose to the go-to…
Eloquent-sluggable in laravel Installation failed? (Solution)
Conclusion: don’t install laravel/framework v5.7.9 cviebrock/eloquent-sluggable 4.8.x-dev requires illuminate/config ~5.8.0 -> satisfiable by illuminate/config[5.8.x-dev Solution:- Depending on your version of Laravel, you should install a different version…
Useful Visual Studio Code Extensions.
1 :-Visual Studio Code HTML Snippets This extension adds rich language support for the HTML Markup to VS Code, including: Full HTML5 Tags Colorization Snippets [partially implemented]…
Creating a OAuth 2.0 Protected REST API In Laravel
Download and install WAMP or XAMPP Server Download and install composer Open Gitbash and Set the composer composer global require “laravel/installer” Create a new Laravel Project Refer…
How to enable Google reCaptcha with Laravel?
Step 1 – First go to https://www.google.com/recaptcha/intro/v3.html then click on Admin console Step 2 – Genereate new recaptcha (click on + button to create) Type label name…
Laravel Social Login using Socialite
Installations—- (laravel 5.5) composer require laravel/socialite “^3.2.0” configuration—–(config/services.php) ‘facebook’ => [ ‘client_id’ => env(‘facebook_CLIENT_ID’), // Your facebook Client ID ‘client_secret’ => env(‘facebook_CLIENT_SECRET’), // Your facebook Client Secret…
How to configure Laravel 5.5 with Bootstrap 4
Bootstrap 3 to bootstrap 4.3.1 upgrade in Laravel 5.5 Note: Laravel 5.5 uses bootstrap 3 by default Steps involved in the upgrade Open gitbash in the home…
