Home » Laravel Tutorial (page 2)

Laravel Tutorial

Laravel – Event Handling

Events provide a simple observer implementation which allows a user to subscribe and listen to various events triggered in the web application. All the event classes in Laravel are stored in the app/Events folder and the listeners are stored in the app/Listeners folder. The artisan command for generating events and listeners in your web …

Read More »

Laravel – Error Handling

Most web applications have specific mechanisms for error handling. Using these, they track errors and exceptions, and log them to analyze the performance. In this chapter, you will read about error handling in Laravel applications. 'debug' => env('APP_DEBUG', false), Important Points Before proceeding further to learn in detail about error …

Read More »

Laravel – Ajax

Ajax (Asynchronous JavaScript and XML) is a set of web development techniques utilizing many web technologies used on the client-side to create asynchronous Web applications. Import jquery library in your view file to use ajax functions of jquery which will be used to send and receive data using ajax from the …

Read More »

Laravel – Sending Email

Laravel uses free feature-rich library SwiftMailer to send emails. Using the library function, we can easily send emails without too many hassles. The e-mail templates are loaded in the same way as views, which means you can use the Blade syntax and inject data into your templates. The following table shows the …

Read More »

Laravel – Validation

Validation is the most important aspect while designing an application. It validates the incoming data. By default, base controller class uses a ValidatesRequests trait which provides a convenient method to validate incoming HTTP requests with a variety of powerful validation rules. Available Validation Rules in Laravel Laravel will always check for errors …

Read More »

Laravel – Localization

Localization feature of Laravel supports different language to be used in application. You need to store all the strings of different language in a file and these files are stored at resources/views directory. You should create a separate directory for each supported language. All the language files should return an array of …

Read More »

Laravel – Forms

Laravel provides various in built tags to handle HTML forms easily and securely. All the major elements of HTML are generated using Laravel. To support this, we need to add HTML package to Laravel using composer. Example 1 Step 1 − Execute the following command to proceed with the same. This …

Read More »

Laravel – Errors and Logging

Errors and exception handling is already configured for you when you start a new Laravel project. Normally, in a local environment we need to see errors for debugging purposes. We need to hide these errors from users in production environment. This can be achieved with the variable APP_DEBUG set in the environment …

Read More »

Laravel – Working With Database

Laravel has made processing with database very easy. Laravel currently supports following 4 databases − MySQLPostgresSQLiteSQL Server The query to the database can be fired using raw SQL, the fluent query builder, and the Eloquent ORM. To understand the all CRUD (Create, Read, Update, Delete) operations with Laravel, we will …

Read More »