Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
Laragigs is a web application for finding and posting gigs. It is built with Laravel 9 and Tailwind CSS. It is a project for learning Laravel 9 and Tailwind CSS.
- View a list of all job listings
- Create a user account and log into the application
- Create a job listing with a title, description, and a way for users to contact the poster and manage all listings created by the user
- Install PHP 8.0
brew install
- Install Composer
Run the 3 installation commands on the terminal from the Composer Website
-
Install Database (MySQL Server & MySQL Workbench) Download and install MySQL Server and MySQL Workbench from the MySQL Website
-
Create & Install Laravel Project with Composer
composer create-project --prefer-dist laravel/laravel PROJECT_NAME
- Configure Database Details
After installing MySQL Server and MySQL Workbench, create a database and configure the database details in the .env file in the root directory of the project.
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=<DATABASE NAME>
DB_USERNAME=<DATABASE USERNAME>
DB_PASSWORD=<DATABASE PASSWORD>
To test the connection, run the following command on the terminal:
php artisan migrate
All of the premade tables should be displayed on mySQL Workbench.
- Serve the Laravel Project
php artisan serve
The following example is a basic workflow for implementing authentication.
- Create a route for creating a new user on the web.php file
// Show Register Create Form
Route::get('/register', [UserController::class, 'create']);
- Create a controller for the route by running the following command on the terminal
php artisan make:controller UserController
- Create a method for the route in the UserController
public function create()
{
return view('users.register');
}