If you want to sort multiple columns in Laravel by using orderBy(). Whenever you need to give multiple column in your query then you can use twice time orderBy() and give them. you can give multiple columns in laravel by following example :
<strong>Users Table :</strong>
<table class="table table-bordered pagin-table"><tbody><tr><th>id</th><th>site_id</th><th>sub_site_id</th><th>name</th><th>email</th></tr><tr><td>1</td><td>4</td><td>7</td><td>john</td><td>email@example.com</td></tr><tr><td>2</td><td>3</td><td>4</td><td>ram</td><td>firstname.lastname@example.org</td></tr><tr><td>3</td><td>4</td><td>2</td><td>ade.....
Contact Us Page is very basic requirement of any Website that way owner can get feedback from users. So, I am going to share with you how to create simple bootstrap contact us form using Form Request in Laravel 5.3.
In this example i create simple "contatctus" table with three simple fields name, email and message. We will simple get value of name, email and message using bootstrap form layout. So you have to just follow bellow few step and you can simple implement contact us form in your website.
So, let's follow bellow step and after complete whole example you will find bellow layout page .....
Today, I am going to tell you how to building and apply new custom paginator view in Laravel 5.3. Laravel 5.3 added new features and update for easily implement your own manual pagination blade template.
By Default Laravel 5.3 provide us very simple bootstrap pagination view. But if you are not using bootstrap and you want to change then you can simply change OR if you want to add new bootstrap pagination layout then you can do it.
In bellow example you can see how to create custom blade layout and use them. This example from scratch so you can simply implement it in your project or laravel .....
In Todays, Social network is very wide and lots of people are connected with them. So, Social authentication is important to implement in website because nowdays most of the users or developer etc will connected with Social network like google,facebook, twitter, gitbub etc. So, In this post i want to share with you how to do sign in with google and how to do sign up with google. Laravel 5 provide very easy way to implement login with your google account and register with your google id. Laravel 5 provide us Socialite package that is help to social authentication. In this post we will make exam.....
In this post, I am going to share with you How to generate SEO friendly URL in Laravel 5 application.
SEO is very important part of website for increase users traffic. If your website have seo friendly URL then it can help to increase your site rand in google index, yahoo etc. So If you require to generate SEO friendly URL in your laravel application then We can do it by "eloquent-sluggable" package. eloquent-sluggable package developed by cviebrock.
Eloquent-sluggable package provide to automatic create unique url for our post. this package create unique slug url that way it is good for SEO.....
Sometimes we require to make subquery inside the select statement in Laravel. At that time we are thinking how to select from subquery using in Laravel Query Builder.
In this post i will give you example of subquery in select statement in Laravel 5 application from scratch. For subquery in select statement we are going to use <strong class="path">DB::raw()</strong>. DB raw function through we can simply make suquery join in Laravel Eloquent Query Builder.
Here as bellow full example, i have three tables as listed bellow:
Whenever you want to define your scheduler task, and if you are working on laravel framework then you can do it easy way and very secure. Laravel provide <strong>Scheduling</strong> and Scheduling through you can manage your cron, if you need to run every day, every minute, every hourly, weekly, on specified days.So, basically i going to give example how to create cronjobs in laravel.
First you have to create one command that way you can create proper programming and good way, but you can also do without create command, It is good if you create your own command and with good code. So, open yo.....
If you want to use Form or Html class and when you will see error like ‘HTML’ class not found OR ‘Form’ class not found. don’t worry about that because Laravel 5 change the package. you should download the HTML and FORM class helper from given instruction above.
Add given bellow text to your composer.json file.
<pre>composer require laravelcollective/html</pre>
after fire composer update command After Update composer, open config/app.php and add this line to the ‘providers.....
laravel default also provide pagination view using bootstrap design like next and previous button and number page with link. but it is a very comman and generally used by most of developer. If you want to change it using Presenter class of laravel. you can set your own custom view for your pagination layout.
In bellow i give you the example of i added first, last, next and previous button and main banifit is that you can easily modify that view and link. so let's see the preview of image layout of pagination.
<img width="100%" src="/upload/laravel_pa.....
Parsley.js through you can add required, Email, Number, Integer, Digits, Alphanum, Url, Minlength, Maxlength, Length, Min, Max, Range, Pattern, Check etc validation provide. you can also add custome validation message for this validation rules. you have to just give attribute of Pars.....