Category : Laravel


How to resolve laravel 5 blank page on server?

When i was created my laravel 5.2 application and i upload application on live GoDaddy server. But i found blank page. I think First you have to check php version on live server. if you run laravel 5+ application then make sure your PHP version at least <strong class="path">PHP 5.5</strong>. But, again i don't know why it was blank page and i checked permission of storage folder 777. so basically when you found blank page on your shared hosting the first make sure permission on <strong class="path">storage Directory 777 Permission</strong>. But if you can't solve and found again then also ch.....

By Hardik Savani | March 6, 2016 | | 2995 Viewer | Category : Laravel
READ MORE

How to use DB transactions in laravel 5?

First, Let's undestand why we are use transactions in laravel project. But db transactions is very important concept and very usefull because it securely manage. laravel 5 also provide to transactions commit, rollback etc functions. How to use transactions in my project, so I an going to give you one example, I have a three table "items", "items_city" and "items_count" and i need to add new row same time and "items" table is a main table then "items_city" and "items_count" is a child table of "items" table. so bassically why we nee to use transactions because if when i was add new records in d.....

By Hardik Savani | March 6, 2016 | | 1880 Viewer | Category : Laravel
READ MORE

How to create middleware for XSS protection in laravel 5?

XSS(Cross Site Scripting) protection must need in your site because if you do not XSS protection then your site is not secure. XSS filter through you can remove html tag from your input value and it is very important to remove html tag for security. in your laravel 5.2 application you can implement by using middleware concept in your project. so how to create XSS filter middleware in your laravel application by using following step. First fire following command and create middleware: <strong class="step">Create Middleware</strong> <pre>php artisan make:middleware XSS</pre> Now, you can see new.....

By Hardik Savani | March 4, 2016 | | 3508 Viewer | Category : Laravel
READ MORE

Laravel 5 create Custom Validation Rule example.

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. .....

By Hardik Savani | March 3, 2016 | | 16304 Viewer | Category : Laravel
READ MORE

Example of unionAll in Query Builder Laravel 5

Sometimes you need to bind multimple query then you can use unionAll in laravel. If you use union all then laravel query builder provide unionAll method for mysql union. when you are doing big project or ERP level project then mostly you require to use union for getting data from database with multiple table. In Following example you can see how to use union all in Laravel 5. <strong>Example:</strong> <pre class="language-php"> $silver = DB::table("product_silver") ->select("product_silver.name" ,"product_silver.price" ,"product_silver.quantity"); $gold = DB::table("product_g.....

By Hardik Savani | March 2, 2016 | | 2719 Viewer | Category : Laravel
READ MORE

Laravel 5 Join with subquery in Query Builder Example

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. <strong>Example:</strong> <pre class="language-sql"> $data = DB::table("items") ->select("items.*","items_count.price_group","items_count.quantity_group") .....

By Hardik Savani | March 2, 2016 | | 13913 Viewer | Category : Laravel
READ MORE

Laravel 5 import export to excel and csv using maatwebsite example.

In this post i will show you how to import excel or csv to store in database and how to export or download excel or csv file from database table by maatwebsite. maatwebsite packages throught you can easily get data, also you can group by data, also create more then one sheet etc. so now i show you simple example of items table data, you can donwload in xls, xlsx and csv formate and also you import data in xls, xlsx and csv formate file. In following few step you can implement import and export both function in your project. First see your browser preview will become like this: <strong>Preivew:.....

By Hardik Savani | February 29, 2016 | | 91861 Viewer | Category : Laravel
READ MORE

How to create laravel 5 widgets ?

In this post you can learn how to create your own widgets in laravel 5.2, First thing why we are create widgets, So we can use widget because when we can create re-usable code, for example you have manu items and comes from database like home, items, products, aboutus, contact us etc. you require to display in top header, in sidebar and in footer. But in top you have to just display home and aboutus, and in sidebar products and items same that way in footer. So, basically you have to display in three place in your site page. widgets through you can make one function or view and call just one w.....

By Hardik Savani | February 27, 2016 | | 3923 Viewer | Category : Laravel
READ MORE

How to convert one time zone to anothor time zone

Some application required one time zone to convert another time zone. PHP provide some readymade timezone conversion classes but it a very complecated. so we have try to define this function simple way. You can createe a simple class and write one function into the class. then you able to use this function everywere. <pre class="language-php"> class convertTimezone { function convert_timezone() // Constructor of the class { } function converToTime($conv_fr_zon=0,$conv_fr_time="",$conv_to_zon=0) { //echo $conv_fr_zon; $cd = strtotime($conv_fr_t.....

By Hardik Savani | February 17, 2016 | | 651 Viewer | Category : Laravel
READ MORE

laravel 5 change date format using carbon example

Sometimes you require to change date format in your laravel app. we have to use Carbon class for change format in laravel, because it provide many date function for like change date formate, count diffrence between two dates in days etc. So, Basically i am going to show you change date format using Carbon. we will use createFromFormat() and format(), createFromFormat() will take two argument first give format of date and second one date and format() take one argument give formate as you want. you can see bellow example: <strong>Example:</strong> <pre class="language-php"> $date = date('Y-m-d H.....

By Hardik Savani | February 16, 2016 | | 3475 Viewer | Category : Laravel
READ MORE

    Laravel 5 - GEO chart example and demo using lavacharts package

    Laravel 5 - GEO chart example and demo using lavacharts package

    Open Post

    Bootstrap form validation example with demo using validator.js plugin

    Bootstrap form validation example with demo using validator.js plugin

    Open Post

    Laravel 5 create and download zip file example using chumper/zipper composer package

    Laravel 5 create and download zip file example using chumper/zipper composer package

    Open Post

    PHP - Input multiple tags with dynamic autocomplete example

    PHP - Input multiple tags with dynamic autocomplete example

    Open Post

    Laravel 5 amazon s3 file upload tutorial - Part 2

    Laravel 5 amazon s3 file upload tutorial - Part 2

    Open Post

    Laravel 5.3 - Form Input Validation rules example with demo

    Laravel 5.3 - Form Input Validation rules example with demo

    Open Post