In this post i want to show you how to use subquery with join in laravel query builder. Whenever you need to use subquery in your laravel project you can use following example and learn hot to use subquery. In bellow example you can see we add subquery using DB::raw(), DB::raw() throught we can select our subtable and after in second argument i added compare your field. That way you can easily fire subquery with laravel 5.2 query builder.
$data = DB::table("items")
Custom Validation Rule is very usefull and interesting concept of laravel 5 because custom validation throught we can re-use validation and use it easily by just name as like laravel core validation(required,same,in etc.). So, In this post i am going to show you how to create custom validation rules in laravel 5.2. you can create very simple way and use too. you can create custom validation rules by few following step and you can see preview of example that give for add custom validation rule. In this example you are creating <strong class="path">is_odd_string</strong> custom validation rule.
Laravel 5's Blade template engine is awesome. you can easyly use PHP variable, js and js library in laravel view. i will create chart using Highcharts in my laravel application. Highcharts is a js library, this library through we can use bar chart, line chart, area chart, column chart etc, Highcharts also provide sevral theme and graph that way you can use more chart from here : <a target="_blank" href="http://www.highcharts.com/">HighCharts Site</a>.
whenever you need to add charts in laravel server side. then you can easily use following example you have to fetch data from database and then.....
Events provides a simple observer implementation, allowing you to subscribe and listen for events in your application. In this posts you can learn how to create event for email send in your laravel 5.2 application. event is very help to create proper progmamming way. First create event using bellow command.
<pre class="prettyprint lang-php">php artisan make:event SendMail</pre>
Ok, now you can see file in this path <strong class="path">app/Events/SendMail.php</strong> and put bellow code in that file.
<pre class="prettyprint lang-php">
In this post i would like to share my experience and solution. when i was working on my laravel e commerce website with gitlab. I was fetching one issue suddenly my view cache with error during development. i did try lot to refresh and something other but i can't see any more change in my view, but at last I did resolve my problem using laravel command so, let's see i added several command for clear cache from view, route, confir etc.
<strong class="example">Reoptimized class loader:</strong>
<pre class="prettyprint lang-php">php artisan optimize</pre>
<strong class="example">Clear Cache fac.....
we mostly need to crop image before upload and as specially when we save image for user profile or etc. In this post i tell you how to crop image and save using jquery ajax.
In this example i use croppie plugin that provide to crop image with zoom and etc. croppie.js plugin is very professional that way we can easily use for crop profile image.
Bellow example through you can implement easily with php and jquery. It is pretty simple example for upload crop and save image php using croppie.js plugin.
You have to create two file and one upload directory for store crop image like as bellow:
Its very common need to get last insert id in programming field, if you are working on laravel framework and you want to fetch last created id, i mean max id, then you do easily.laravel provide method to get last inserted id.
If you are working with DB::table() then you have to use insertGetId() for insert data into database. this function always return inserted record id(primary key).it is very simple way to get id, in following example you can see and undestand more:
public function getLastInsertedIdDB()
$id = DB::table('items')->inser.....
Today, I am going to show you how to make select2 dynamic autocomplete from database table in your Codeigniter application. In this post you can lean how to implement ajax autocomplete in your Codeigniter 3 project.
Select2 is a Jquery plugin and it is a very famous jquery plugin, using select2 plugin we can do several thing like select box with search, select option with check box, ajax auto-complete etc.
sometimes we require to do autocomplete task with select box when we have large amount of data like products, items, category, tags, users etc. so we can't load all the data at the same ti.....
Today, I am going to show you How to image or file upload using jquery Ajax in our Laravel application. In this tutorial i explain step by step example code of ajax image upload using jquery form JS.
As you know today, we have basic feature image or file uploading(<a href="http://itsolutionstuff.com/post/laravel-53-image-upload-with-validation-exampleexample.html" target="_blank">Laravel 5.3 Image Upload with Validation example</a>) on our PHP Project Or Laravel application. Client always want to store image for profile, products, items, users etc. Laravel provide very simple way to store tha.....
Today, I am going to give you how to use input form validation rules of Laravel 5.3. We always require to use form with validation in our Laravel application. So today you can learn how to implement validation rules and how to print error message on blade files.
Laravel 5 provide several pre-define validation rules that way we can user it simply. In this example i used some validation rules that listed bellow that need to apply.
<strong>1)required:</strong> for must be required field.
<strong>2)min:</strong> for limit to enter minimum character.
<strong>3)max:</strong> for limit to enter maxi.....