by admin | Dec 12, 2019 | Laravel
Raw SQL Queries: Laravel interact with databases by the variety of database back-ends with raw SQL, the fluent query builder, and the Eloquent ORM. Laravel supports four types of databases: MySQLPostgreSQLSQLiteSQL Server Configuration The database configuration of...
by admin | Dec 12, 2019 | Laravel
by admin | Sep 11, 2019 | Laravel
Laravel provides a different way to validate the applications incoming data. Laravel base controller class uses a ValidatesRequests that provides an easy method to validate incoming HTTP request with many powerful validation rules. Defining the Routes The following...
by admin | Sep 11, 2019 | Laravel
Authentication is a process of identifying user credentials. Laravel makes implementing authentication very simple. The authentication configuration file is located at config/auth.php that contains various documented options for adjusting the behavior of the...
by admin | Sep 11, 2019 | Laravel
Retrieving Uploaded Files We can access files from an Illuminate\Http\Request. By using the file method or using the dynamic properties. The file method returns an instance of the Illuminate\Http\UploadedFile class that extends the PHP SplFileInfo class. It provides a...
by admin | Aug 31, 2019 | Laravel
Database Migrations in Laravel Introduction Migrations are version control for our database. It allows our team to modify and share the applications database. Migrations are paired with schema builder to build an applications database schema quickly. The Laravel...
by mayankjtp | Aug 22, 2019 | Laravel
CSRF Field For defining an HTML form in our application, we should include a hidden CSRF token field in the form, so that the CSRF protection middleware can validate the request. We use the @csrf Blade directive to generate the token field: <form method= "POST"...
by mayankjtp | Aug 14, 2019 | Laravel
by mayankjtp | Aug 14, 2019 | Laravel
Display data that is passed to our Blade views by enclosing the variable in curly braces. The following route is given below: Route::get('greeting', function () { return view('welcome', ['name' => 'rafia']); }); 12345 Route::get('greeting', function ()...
by mayankjtp | Aug 14, 2019 | Laravel
Blade also provides convenient shortcuts for common control structure in PHP, such as conditional statements and loops. These shortcuts provide a very clean working with PHP structures, while also remain familiar to its PHP counterparts. If Statements We...