Laravel Helpful Code Snippets

Followings are some of useful code snippets of Laravel: 1). Show validation errors in view: @if($errors->has()) @foreach ($errors->all() as $error) <div>{{ $error }}</div> @endforeach @endif 2) Prevent errors by using the optional helper: When accessing object values, if that object is null, your code will raise an error. A simple way of avoiding errors is … Continue reading Laravel Helpful Code Snippets

How to install laravel project cloned from github

If you found laravel project from github.com and you want to setup and use it locally, following are some helpful steps: Clone your projectGo to the folder application using cd command on your cmd or terminalRun composer install on your cmd or terminalCopy .env.example file to .env on the root folder. You can type copy … Continue reading How to install laravel project cloned from github

Laravel Middleware

What is Middleware In Laravel, Middleware is the mechanism to apply any type of filtering you may need to HTTP requests to your application. Middleware works between request and response of our application.It sits between Request and Response like a firewall that examine whether to route a request.Laravel comes with several inbuilt middlewares like EncryptCookies … Continue reading Laravel Middleware

Laravel Basic Concepts

Followings are list of basic Concepts in Laravel: Routing Controllers Views Blade templating Requests and Responses Models & Migrations Middleware Eloquent ORM Routing: Routing means to accept the request and redirect it to appropriate function. Routing is a core concept in Laravel, and it works a little differently than some of the frameworks of the … Continue reading Laravel Basic Concepts

Laravel Interview Questions and Answers

Question: What is Laravel? Laravel is a open-source PHP framework developed by Taylor Otwell used for Developing the websites. Laravel helps you create applications using simple, expressive syntax. Question: What are Advantages of Laravel? Easy and consistent syntax Set-up process is easy customization process is easy code is always regimented with Laravel Question: Explain about … Continue reading Laravel Interview Questions and Answers

Laravel Introduction

    What is Laravel? Laravel is a free, open source PHP web application framework, designed for the development of model–view–controller (MVC) web applications. Laravel is released under the MIT License, with its source code hosted on GitHub. Laravel is a web application framework with expressive, elegant syntax. Laravel attempts to take the pain out … Continue reading Laravel Introduction