Category : Laravel


How to get last executed mysql query in laravel ?

If you are working on laravel framwork and you use query builder of laravel 5. but you want to get last executed mysql query from laravel. If you are working on laravel 5 then you have to first enable query log that way it can be store query log. At last getQueryLog() through you can get last executed query. I give you example of how to get last executed mysql query. you can use example as following example. <pre class="language-php"> public function querylog() { DB::enableQueryLog(); $item = Item::find(2); $last_query = DB::getQueryLog(); print_r($last_query); } </pre> Try this......

By Hardik Savani | January 11, 2016 | | 1211 Viewer | Category : Laravel
READ MORE

Mysql procedure with pagination in laravel 5?

You are working on laravel with mysql database. you had created mysql procedure for get data and you want to call procedure with pagination in laravel 5 then you can not directly make pagination as laravel document.If you are using directly MySQL stored Procedure in your controller, model or repository and you want to give pagination like this way : <pre class="language-php"> $data = DB::select(DB::raw('CALL hardik("hari")'))->paginate(5); </pre> This way you found error in your Laravel 5 website. we can't give directly this way pagination because your procedure will get all the data fr.....

By Hardik Savani | January 11, 2016 | | 2593 Viewer | Category : Laravel
READ MORE

How to set URL without http of Other site in Laravel?

you are working on laravel php framework and you want to give any other site URL. we can easily give url using a tag like href="https://www.facebook.com" but if you are work on laravel then it can't redirect on given URL because laravel always redirect on current site, but we have solution of this problem. How to set URL without http or https of Other site in Laravel Website?, i describe as under. For example if you want to give facebook url then you can give this way : <pre class="code language-html"> <a href="//facebook.com" target="_blank">FB</a> </pre> Try this.....

By Hardik Savani | January 10, 2016 | | 713 Viewer | Category : Laravel
READ MORE

How to add ckeditor with image upload in Laravel ?

if you want to use ckeditor in laravel and you also want to add file uploading as well. if you are use simply in php then it is very simple. but if you are set laravel then you fetch many problem like i also fetch lots of problem. Now, i will give you few step to set ckeditor with file uploading and you will easily apply this. this is a very simple to browse your image, file etc upload. use ckeditor in php, use ckeditor in laravel 4, use ckeditor in laravel 5, how to add ckeditor in laravel, laravel ckeditor image upload, laravel ckeditor example, laravel ckeditor sample, ckeditor laravel 4,.....

By Hardik Savani | January 8, 2016 | | 7775 Viewer | Category : Laravel
READ MORE

How to add pagination with union in Laravel 4 and Laravel 5 ?

You are using union and you want to give pagination, but you can't give. i also fetch that problem if you use union with pagination. you have to create pagination manually using Paginator Class. if you are using Laravel 4 then you can use Paginator Class library and if you use Laravel 5 then you have to give help of \Illuminate\Pagination\LengthAwarePaginator Class function. you have to many times need give a manually pagination like if you are using having, union etc. now i am giving you example of Laravel 4 and Laravel 5 both you can do this way. <strong>Laravel 5</strong> <pre class="langu.....

By Hardik Savani | January 6, 2016 | | 4104 Viewer | Category : Laravel
READ MORE

How to create a text file for JSON and file download in Laravel 5?

If you want create your own text file, html file, css file, php file, json file etc in Laravel. then we do not need to use any PHP library or Class because Laravel Framwork Provide its own "File" Facade. File Class through you can create your own html file, txt file, php file etc as you want. File Facade Class also provide several function like you can create file, remove file, update file etc. now i am giving you example of how to create json file in Laravel. you also want to download file that you created now, i mean you want to give download file, then you can also give download that file .....

By Hardik Savani | January 6, 2016 | | 7471 Viewer | Category : Laravel
READ MORE

    PHP - Input multiple tags with dynamic autocomplete example

    PHP - Input multiple tags with dynamic autocomplete example

    Open Post

    PHP Image upload without refreshing page using jquery example

    PHP Image upload without refreshing page using jquery example

    Open Post

    Laravel 5 create custom artisan command with example

    Laravel 5 create custom artisan command with example

    Open Post

    How to integrate stripe payment gateway in Laravel 5.4 Application ?

    How to integrate stripe payment gateway in Laravel 5.4 Application ?

    Open Post

    Laravel 5 Stripe example using Laravel Cashier from Scratch

    Laravel 5 Stripe example using Laravel Cashier from Scratch

    Open Post

    Solved Issue - "/usr/bin/env: ‘node’: No such file or directory"

    Solved Issue - "/usr/bin/env: ‘node’: No such file or directory"

    Open Post