Welcome to the Laravel Blog Posts for Beginners repository! This project is designed to help beginners get started with Laravel and build a simple blog application. Follow the steps below to set up the project and explore its features.
-
Resource Routes: Learn how to define and use resource routes in Laravel.
-
Resource Controllers: Explore the use of resource controllers to handle CRUD operations efficiently.
-
Implicit Route Model Binding: Understand and implement implicit route model binding for cleaner controller methods.
-
Accessors: Learn how to use accessors to manipulate attribute values in your Eloquent models.
-
Storage Public Disk for File Uploads: Explore how to use Laravel's storage system and the public disk for handling file uploads.
-
One to One Relationship (Inverse): Implement and understand the inverse side of a one-to-one Eloquent relationship.
-
Many to Many Relationship: Dive into the concept of many-to-many relationships in Laravel Eloquent.
-
Eager Loading (Solution to N+1 Query Problem): Solve the N+1 query problem by implementing eager loading for efficient database queries.
-
Route View: Learn how to route directly to a view without a controller.
-
Route Redirect: Understand and implement route redirection for a better user experience.
-
Bootstrap UI Package for Login: Integrate Bootstrap UI package to enhance the visual appearance of the login functionality.
-
Bootstrap Pagination: Implement Bootstrap pagination for better navigation through paginated data.
Before you begin, make sure you have the following installed on your system:
-
Clone the repository to your local machine:
git clone https://github.com/Asad9299/laravel-blog-posts-for-beginners.git
-
Navigate to the project directory:
cd laravel-blog-posts-for-beginners
-
Install Composer dependencies:
composer install
-
Install NPM dependencies and compile assets:
npm install && npm run dev
-
Copy the example environment file:
cp .env.example .env
-
Configure your
.env
file with appropriate database and other settings. -
Generate application key:
php artisan key:generate
Use the following credentials to log in as a test user:
- Email:
[email protected]
- Password:
12345678
-
Start the development server:
php artisan serve
-
Visit http://localhost:8000 in your web browser.
-
Log in using the provided test user credentials.
If you find any issues or have suggestions for improvement, feel free to open an issue or submit a pull request.
Happy coding!