In Laravel there several facades to use like DB, URL, Validator ,Request etc. Facades are used to use the class methods statically using the application service container. In this article we will learn to create our own facades with service container. Let’s start with step by step For a better…
Create custom library or custom class in Laravel 8 / 9
Laravel provides various packages and library to enhance our application features and functionalities but sometime we want our custom class in laravel to handle the few features of the application. Thus I this article i will show you to create a class and use it using the alias or directly…
How to Create Custom Helper Functions in Laravel ?
Sometimes in our application we want to create custom helper functions in laravel to use in our application, Laravel has so many helpers functions to work with strings, URL, email, array, debugging etc. so in this article i will show you to use custom helper functions in our Laravel application….
Create custom form control in angular 12 / 13
In this article i will show you to use FormControl in child component. By default child component can not access the FormGroup and we can not use FormControl or FormControlName in parent child component approach. You can also read How to make reusable components in angular? for how child and…
Laravel blade foreach, for and loop variable with example
Laravel blade provides easy way to iterate a long list array or loop using @foreach and @for. @foreach and @for both used same structure as php foreach and for. In this article i will show you to use @foreach and @for loop with example and also the $loop variable. Loop…
How to use conditional validation Laravel 8 / 9 ?
In Laravel sometime you want to exclude some validations on specific condition. Laravel provides exclude_if, exclude_unless and sometimes validation rules to validating some rules conditionally. In this tutorial we will take a simple example of has_city is checked then city name should be require and if its not checked then…
How to use if else condition in Laravel 8 blade file ?
In this tutorial i will show you to use if else, if and else if in Laravel blade. Laravel use blade engine to render the template and blade have rich features to use conditional statements in file. So here i will show you to use @if, @elseif and @else in…
Laravel array validation with example
In this tutorial i will explain to use validating a array inputs using Laravel validation library. Laravel also supports to validate group of array and we can validate a array same as normal input. In our recent article Laravel form validation how to validate a form and files. In this…
How to make database connection in Laravel 8 ?
Laravel comes with first party support for several database drivers. Laravel gives much better flexibility in terms of using the RDBMS based databases. Laravel supports MySQL, PostgreSQL, SQLite and SQL Server by default but if you want to make connection with Mongo or other database then you need to install…
Laravel view – A complete guide for beginner
Laravel view is the presentation layer of laravel. Views are used to show the html and keep separate controller login from view logic. We can created nested views, dynamic views to show dynamic data, include another view in a view. It’s not practical to use a long html in controller…