jQuery is most popular library to handle the client side events like form submit, click, change etc. In this article we will learn to submit the form using jQuery Ajax method. Ajax is mostly used when we do not want to reload the page and real time interaction. In this…
Understanding Laravel request with example
Laravel provides a own class to handle the request which is Illuminate\Http\Request. Request is used to retrieve the user input(GET and POST), cookies and files that was submitted during the request. Get the request in controller Current Request can be get retrieved in controller by injecting the dependency in controller…
How to create custom directive in Laravel 8 ?
Laravel blade is powerful template engine which makes short tags directive and easy to reuse templates. Most of the templates restrict to use other language but blade gives more flexibility and we can use PHP as well in template. Directives start with prefix @ and accepts parameter. In this article…
How to set and get session in Laravel 8?
Laravel has its own class to manage the session using the file system, redis, array, cookie and database. Session are used to keep the information about the user across the multiple request. As we know PHP is a server side language and all information lost after the response, so keep…
Laravel reusable slug generator using trait
In our last article Laravel slug generator with example we demonstrate how we can generate slug for model but in that article we need to rewrite the same code for multiple models if we want use the slug generation in multiple model. so in this article i will show you…
Laravel slug generator with example
In this article we are going to create slug from any input field. slug is useful search engine optimization and also from security perspective because in some case we use primary id or unique id of table to fetch the detail in page but its not recommended way to show…
How to create controller in Laravel 8?
In Laravel controller is most important part to create the connection between our business logic to our view. we will learn create controller in laravel 8.Laravel is a MVC pattern and C stands for controller. It’s responsible for to receive the input from user, process them and validate the input…
How to create resource controller in Laravel 8 ?
Resource controller is helpful when you want Create, Read, Update and Delete (CRUD) operations. If you have a model with same set of actions like crud then resource controller are useful. we can create resource controller easily using the artisan command. Above command will generate controller ImageController in \app\Http\Controllers. As…
What is Laravel 8 middleware ?
Laravel middleware is a mechanism to filter the http request and response. As the name implies that middleware so it’s middle between the request and response. we can change or validate request and response using the Laravel middleware. There is so many use cases of middleware like authentication, validating token,…
Convert any form into Ajax request in jQuery
In this tutorial i am going to change a simple html form into Ajax form or submitting a form without reload. For this purpose i will use jQuery Ajax method and serialize method. i also created simple jQuery plugin which you can integrate in your web application and take benefit…