Category : Laravel


Laravel 5 - where condition with two columns example code

Laravel 5 introduce whereColumn() in Query Builder, that way we can compare two column like simple where condition. We sometimes require to check this type of condition. In this example code, i have simple "items" table and i want to get only created_at and updated_at column should equals. So you can also check bellow laravel eloquent as bellow: <strong>Example:</strong> <pre class="prettyprint lang-php"> $data = DB::table("items") ->whereColumn('created_at','updated_at') ->get(); print_r($data); </pre> <strong>Example 2:</strong> <pre class="prettyprint lang-php"> .....

By Hardik Savani | July 29, 2016 | | 1314 Viewer | Category : Laravel
READ MORE

How to create authentication(login and registration) in Laravel 5.2?

We always wanted to do authentication system in your project, i mean sign-in, sign-out, sign-up and forgot password for our project. If you work on core PHP, or any PHP framework then it will take long time and large amount code as well to make auth module for your application. But Laravel 5.2 provide simple way to create authentication module in your laravel application. Laravel 5.2 provide several php artisan command, that command through we can generate authentication module easily. Laravel 5.2 also will create new auth route and blade file, that way you can also customize your auth modul.....

By Hardik Savani | July 28, 2016 | | 4069 Viewer | Category : Laravel
READ MORE

How to get current controller name in view Laravel 5?

If you require to get current controller name in your view file or in your middleware or your serviceprovider etc. you can get your controller details from current route like UserController, HomeController ect. you can also get full path of controller file. Laravel getAction() through we can get whole array of current route details, in this example i get current controller in my auth middleware, if you require on your view file or other place then you can simply get. So, let's see example how you can get controller name in auth middleware. <strong>Example: app/Http/Middleware/Authenticate.p.....

By Hardik Savani | July 27, 2016 | | 1892 Viewer | Category : Laravel
READ MORE

Laravel 5 and Vue JS CRUD with Pagination example and demo from scratch

In Todays, Most popular JS Framework are Angular JS and Vue JS. Angular JS and Vue JS are a very user friendly JS Framework and most popular. It provides to manage whole project or application without refresh page and powerful jquery validation. In this post i going to lean how to create CRUD(Create, Read, Update and Delete) application with pagination using Laravel 5. In my previous tutorial i added crud application using Angular JS, if you want to see then click here: <a href="http://itsolutionstuff.com/post/laravel-52-and-angularjs-crud-with-search-and-pagination-exampleexample.html" targe.....

By Hardik Savani | July 25, 2016 | | 72724 Viewer | Category : Laravel
READ MORE

How to get size of directory in MB Laravel 5?

Mostly we require to calculate for uploaded directory size because we can see how much we size allocate in uploaded directory. If you have limited server then you always need to check how much size of data in my folder. You can also get size of directory that way you can also display on your admin panel. Laravel provide File facade. File facade through we can get folder size in kb or mb or gb etc. In bellow example i have <strong class="path">images directory</strong> in public folder. so we can get size for images folder like this way : <strong>Example:</strong> <pre class="prettyprint la.....

By Hardik Savani | July 23, 2016 | | 1188 Viewer | Category : Laravel
READ MORE

Solved - gulp error cannot find module laravel-elixir

If you also find error like "laravel-elixir not found" on gulp then you can install laravel-elixir npm package manually. I also fetch this error when i was new in laravel and working with gulp first time. We can solve laravel-elixir not found error using laravel-elixir nodejs package. So you can run just bellow command and check. First command if you run already then don't require to run. <strong>Command:</strong> <pre class="prettyprint lang-php"> npm install npm install laravel-elixir </pre>

By Hardik Savani | July 22, 2016 | | 1645 Viewer | Category : Laravel
READ MORE

How to clear log file using command in laravel 5 ?

I was working on my laravel project, i found one issue that too much load my log file when i open and i want to remove that data, i mean hang my system and must need to restart my system. I thought what will issue, but i got it because in my laravel.log<strong class="path">(/storage/logs/laravel.log)</strong> file had big size of data and my text editor can't load and i want to clear that's way i can see other error. I did search on google at last i found the solution using command, we have to just run command in out terminal or cmd and we can remove all data of log file. So let's fire bellow.....

By Hardik Savani | July 21, 2016 | | 2389 Viewer | Category : Laravel
READ MORE

Bootstrap form validation example with demo using validator.js plugin

We always need to add validation on form like registration form, contact form, login form etc. we always prefer to give validation error after page refresh but you can give validation without page refresh. If you use bootstrap then you can use easily validator.js plugin. validator.js plugin gives client side validation without page refresh. We can use simply. validator.js plugin we can add validation in our PHP project, or any framework like laravel framework, codeigniter framework, symphony framework etc. In this example i give you how can you give validation for require field, email, minle.....

By Hardik Savani | July 20, 2016 | | 22582 Viewer | Category : Laravel
READ MORE

Laravel - How to get current URL in controller or view?

We always require to get current URL path when work on ajax pagination or something, at that we require to get current page URL on Controller or blade file. So, you can get current url easily. Laravel provide URL facade that way we can get current URL anywhere, as bellow you can see i use current() of URL facade. URL facade through you can get your current page url from every where. So you can check your current url this way: <strong>Example:</strong> <pre class="prettyprint lang-php"> $currentURL = URL::current(); dd($currentURL); </pre>

By Hardik Savani | July 20, 2016 | | 2314 Viewer | Category : Laravel
READ MORE

Laravel 5 - GEO chart example and demo using lavacharts package

Today, i going to give you example of how to add geochart in your laravel 5 application using lavacharts package. Normally we used geochart on back-end for check users country wise with graphical way. In this post we will implement geo chart with country and it's total users. lavacharts advantage is you can manage all data with chart matadata from controller, you just render on view. lavacharts provide several other charts like bar chart, Area chart, Column Chart, Pie Chart, Line Chart etc. In this post we will use geo chart with good graphical way. you can use in your laravel application, y.....

By Hardik Savani | July 19, 2016 | | 5877 Viewer | Category : Laravel
READ MORE

    Bootstrap form validation example with demo using validator.js plugin

    Bootstrap form validation example with demo using validator.js plugin

    Open Post

    AngularJS - Display Default image if original image does not exists with example

    AngularJS - Display Default image if original image does not exists with example

    Open Post

    How to send mail using zoho smtp server in PHP Laravel?

    How to send mail using zoho smtp server in PHP Laravel?

    Open Post

    Laravel 5 - Twitter API using thujohn/twitter composer package tutorial

    Laravel 5 - Twitter API using thujohn/twitter composer package tutorial

    Open Post

    Laravel 5 Localization(trans helper) tutorial example

    Laravel 5 Localization(trans helper) tutorial 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