Sometimes, we need to create file of our project directory and give to download that zip file to users. we are always prefer zip file because it is very safe and secure from virus. If you want to generate zip file and donwload that file in your laravel 5 application then you do it easily using chumper/zipper composer package. In this post i give you example to create zip file and donwload from scratch. So first we have to follow bellow step for install package.
First fire following command on your terminal.
<pre>composer require chumper/zipper</pre>
In this post you can learn how to integrate mailchimp api in your laravel 5 application. Mailchimp provides manage subscribers, send emails using campaign and also track email results etc. Mailchimp through you can track how much subscribers open email and read. If you have newsletter website or any tutorial website then you should add email subscriber function that way we can inform through email.
I use skovmand/mailchimp-laravel laravel package for mailchimp api in laravel 5 application. In this example you can subscriber email and send campaign from laravel application from scratch, so if .....
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.....
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 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.....