August 11, 2021 in Laravel, MySql, Php, Tips and Tricks
multiple database laravel 8
config/database.php
August 11, 2021 in Laravel, MySql, Php, Tips and Tricks
config/database.php
August 9, 2021 in Laravel, Technology, Tips and Tricks
Command Description $table->id(); Alias of $table->bigIncrements(‘id’). $table->foreignId(‘user_id’); Alias of $table->unsignedBigInteger(‘user_id’). $table->bigIncrements(‘id’); Auto-incrementing UNSIGNED BIGINT (primary key) equivalent column. $table->bigInteger(‘votes’); BIGINT equivalent column. $table->binary(‘data’); BLOB equivalent column. $table->boolean(‘confirmed’); BOOLEAN equivalent column. $table->char(‘name’, 100); CHAR equivalent column with a length. $table->date(‘created_at’); DATE equivalent column. $table->dateTime(‘created_at’, 0); DATETIME equivalent column with precision (total digits). $table->dateTimeTz(‘created_at’, 0); DATETIME (with timezone) equivalent […]
August 8, 2021 in Laravel, Php, Technology, Tips and Tricks
How to install Laravel using composer Create View in Laravel Create model, controller and view in Laravel Step 1: Create model and controller Step 2: Create View in Laravel Step 3: call controller using route and display view Note: changing the RouteServiceProvider.php file in App/Providers/ path by uncommenting the code. protected $namespace = ‘App\Http\Controllers’; Create […]
April 25, 2020 in Laravel, Php, Tips and Tricks
There are two ways available to find the version of the Laravel application. You can either find it by running a command or you can check the Laravel version in files. Command to find Laravel Version Open the terminal on your system. Navigate to the webroot directory of the Laravel application. Now execute the following […]
November 21, 2019 in Laravel, Learning, News
Credit where is due. Last year I stumbled upon an article of Josip Crnković, in which he walked through some of the useful interfaces the framework has. In it, he discovers some that are used to send a Response to the browser. After giving them a shot, I have to say these alleviates a lot of DRY problems […]
November 11, 2019 in Laravel, Tips and Tricks
Many times you face an issue that any changes to the Laravel application are not reflecting on web interfaces. This occurred due to the application is being served by the cache. This tutorial will help you to clear cache in the Laravel application. Clear Cache in Laravel (Terminal) Log in to the system running your […]
July 11, 2019 in Laravel, News
Introduction Artisan is the name of the command-line interface included with Laravel. It provides a number of helpful commands for your use while developing your application. It is driven by the powerful Symfony Console component. Usage Listing All Available Commands To view a list of all available Artisan commands, you may use the list command: Viewing The […]
June 25, 2019 in Laravel, Tips and Tricks
What about just using .htaccess file to achieve https redirect? This should be placed in project root (not in public folder). Your server needs to be configured to point at project root directory. <IfModule mod_rewrite.c> RewriteEngine On # Force SSL RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Remove public folder form URL RewriteRule ^(.*)$ public/$1 [L] […]