Category Archives: Laravel

Laravel command not found ubuntu mac

Rakesh Sharma      1 Comment  

Laravel command not found ubuntu mac :-

Installing laravel via laravel installer so easy but sometime we stuck with some commands. this is new and fast method of it’s installation. i am sharing soultion of this one of error in Laravel command not found ubuntu mac. there is only path setup problem. that’s not cleared explained in there official docs. so i have also serached more for laravel command not found. when i type laravel after install. it’s all time shows error laravel command not found. so there is simple solution for this. In this artice we will explore error laravel command not found ubuntu mac for both operating system for ubuntu and mac.

How to create admin panel in laravel

Rakesh Sharma      5 Comments  

How to create your first admin panel or interface in laravel

Admin Panel :- A restricted interface which will be accessed by owner/administrator roles who can control the site.

Every sites need a back-end or admin interface to control sites or for keep sites dynamic. In laravel we can make admin panel easily but in different way like other php framework Codeigniter, yii etc. We can access directly admin sub-directory using url in other frameworks but in laravel for access admin panel or interface we need namespace defines.There is more different ways to create an admin panel but i am sharing a simple way to create admin interface in laravel.

How to create pagination in laravel

Rakesh Sharma      4 Comments  

How to create pagination in laravel :-

When working with thousand or millions of record or working with bunch of data and need to show them then we need to divide into more pages to show all data in parts. to prevent millions of records show in a single page. records showing in parts is a good functionality to prevent query fails and long time process.
For this we need to use pagination (refers to links that allows you to navigate from page to page). We can easily create pagination in laravel with it’s own library also laravel provide twitter bootstrap pagination links for showing pagination counting.

laravel has pagination configuration option in the “app/config/view.php” file. Laravel includes two views for pagination option to create pagination links :-

Laravel 5 form validation

Rakesh Sharma      2 Comments  

How to use form validation in laravel :-

A form validation means we forcing user to enter correct data in form field according to our need. Laravel provide a simple, convenient facility for validating data and retrieving validation error messages using Validation class.
In below we are making a fully code to validate a form in laravel using controller. Making a view file which contain form and form for fields and validation error message showing code. In controller we are validating all input and applying validation rules and custom error messages and sending back to view with validation error messages on view.
so Let’s create a form to understand form validation in laravel.

Pass data from controller to view laravel

Rakesh Sharma      15 Comments  

Pass data from controller to view laravel :-

Sometimes we need to pass data from controller to view in laravel like working with database query, select option and more. it’s simple and easy with built in function in laravel. We can send data from controller to view easily with with() in laravel. Also there are more way to send or pass data to view from controller. I am describing some easy way how to pass data form controller to view in laravel.

Upload multiple files in laravel 5

Rakesh Sharma      16 Comments  

Upload multiple files or images in laravel :-

Read my previous tutorial upload files in laravel for basics of upload files or images. Now we are going to learn how to upload multiple files or images in laravel. sometimes we need to use multiple files or images to upload at once. my previous blog working for upload single file so i am sharing one more blog to upload multiple files or images. let’s check how we can easily upload multiple images in laravel.

Upload files in laravel 5

Rakesh Sharma      49 Comments  

Upload files or images in laravel :-

It’s easy to working with files or images in laravel. we can easily validate and upload files in laravel. laravel have it’s own functions to make files upload easy and fast. i am sharing some code to upload image in laravel or any of files type. it’s also easy to validate file types.

1. create a form with attribute ‘files’=>true or try below code (in my case i have views/pages/upload.blade.php) :-

How to use session in laravel

Rakesh Sharma      22 Comments  

How to use session in laravel :-

Laravel provides more inbuilt method to get and set session data. it’s easy to working with session in laravel.A session variable is used to store some information or some data about user or anything you want to access on all pages of an application.In laravel session configuration is stored in “app/config/session.php”.
so let’s see how to use session in laravel.
Setting a single variable in session :-

How to create eloquent model in laravel 5

Rakesh Sharma      No Comments  

How to create eloquent model in laravel 5 and use model in controller What is model :- The model contains your application’s logic and rules or you can say keeping application’s database interactions. Laravel provides a beautiful, simple ActiveRecord implementation using Eloquent ORM for working with your database. Using Model… Read more »

Basic routing in laravel

Rakesh Sharma      No Comments  

Basic get and post routing in laravel :-

Routing in laravel defined in the app/routes.php file. Another good features of Laravel is its routing.
Laravel routes consist of a URI and a Closure callback. we will see how we can manage or apply routing in laravel. We need to set routes both for post and get method in laravel. so need to learn and define routing in laravel site.
In this blog we will see basic routing in laravel for static pages and Route parameter. So we need to make route for each url like http://example.com/, http://example.com/contact

Static pages (Basic GET Routing) :-

Make default home page (app/views/home.blade.php)

How to create custom configuration in laravel

Rakesh Sharma      2 Comments  

How to create custom configuration in laravel :-

All configuration files of Laravel framework stored in the app/config directory.
so if we need to create custom configuration values it would be better to keep separate our custom configuration in custom file.
so we need to create custom file in app/config directory. laravel auto read this file as a config file and will auto manage it
In this topic we are working with custom configuration in laravel and get configuration value in controller or view.

Create custom configuration in laravel :-

create a file in app/config/custom.php which have config keys and value like:-