Follow these steps to set up and run the Laravel project locally:
-
Install Requirements
- PHP 7.3 or higher
- Composer
- MySQL or another supported database
- (Optional) Node.js and npm for asset compilation
-
Clone the Repository
git clone https://github.com/MuhammadAlifBudiman/alblog cd alblog -
Install PHP Dependencies
composer install
-
Copy the Example Environment File
cp .env.example .env
-
Set Up Environment Variables
- Edit the
.envfile and set your database credentials and other settings as needed.
- Edit the
-
Generate Application Key
php artisan key:generate
-
Run Database Migrations
php artisan migrate
-
(Optional) Seed the Database
php artisan db:seed
-
Create Storage Symlink
php artisan storage:link
-
(Optional) Install Node.js Dependencies and Build Assets
npm install && npm run dev -
Start the Development Server
php artisan serve
Then open http://127.0.0.1:8000 in your browser.
This project is a learning exercise based on the YouTube playlist "Belajar Laravel 8" by Web Programming UNPAS. It is designed to help beginners understand the Laravel framework by building a practical web application step-by-step.
You can find the playlist here. The following is the list of videos in the playlist:
-
Introduction to Laravel 8
This video provides an introduction to Laravel 8, starting with an overview of what Laravel is and its purpose as a web application framework. It covers the philosophy and goals of Laravel, its key features, and its ecosystem. The video also highlights the prerequisites for learning Laravel, including basic knowledge and software requirements. By the end of this video, viewers will have a foundational understanding of Laravel and be ready to start their learning journey. -
Installation and Configuration
This video demonstrates how to install and configure Laravel 8 on both MacOS and Windows operating systems. It provides a step-by-step guide for setting up the development environment, ensuring that viewers can follow along regardless of their platform. By the end of this video, viewers will have a fully functional Laravel installation ready for development. -
Folder Structure, Routes, and Views
This video explores the folder structure of a Laravel 8 project, providing an understanding of how the framework organizes its files and directories. It also covers routing, explaining how to define and manage routes in Laravel. Additionally, the video introduces views, demonstrating how to create and render them, as well as how to pass data to views. By the end of this video, viewers will have a solid grasp of Laravel's folder structure, routing, and view system. -
Blade Templating Engine
This video introduces the Blade Templating Engine, a powerful feature in Laravel 8 for creating dynamic and reusable views. It starts with an overview of the Blade documentation and demonstrates its usage in building layouts and templates. The video also includes a simulation of blog posts and a single post view, showcasing how Blade simplifies the process of rendering dynamic content. By the end of this video, viewers will understand how to effectively use Blade for templating in Laravel projects. -
Model, Collection & Controller
This video discusses the components of Model and Controller in Laravel 8. It includes an introduction to models, collections, and controllers, along with practical examples. The video also revisits and improves the code from the previous video. By the end of this video, viewers will have a clear understanding of how to work with models, collections, and controllers in Laravel. -
Database, Migration & Eloquent
This video covers working with databases in Laravel 8, focusing on MySQL integration and connecting it to the Laravel application. It introduces environment variables, database migrations, and the Eloquent ORM. By the end of this video, viewers will understand how to set up and interact with a database in Laravel. -
Post Model
This video focuses on creating the Post model correctly, which was previously created manually. It also covers Mass Assignment and Route Model Binding, providing a deeper understanding of these concepts in Laravel. -
Post Category & Eloquent Relationship
This video explores the relationships between tables or models in Laravel 8 using the Eloquent Relationship feature. It also includes creating a model for the Post Category. -
Database Seeder
This video covers the usage of Database Seeder in Laravel 8. It explains how to seed data into the database and demonstrates practical examples of using seeders to populate tables with sample data. -
Factory & Faker
This video explores the usage of the Factory and Faker features in Laravel 8. It demonstrates how to generate fake data for testing and development purposes. -
N+1 Problem
This video explains the "N+1 Problem" that can occur in applications and demonstrates how to identify and resolve it in Laravel 8. -
Redesign UI
This video focuses on improving the UI of the blog application to make it look fresher and more appealing. -
Searching & Pagination
This video demonstrates how to add Searching and Pagination features to a Laravel 8 application. It includes creating a search form, implementing query filters, and adding pagination to improve the user experience. -
View Login & Registration
This video demonstrates how to create the login and registration views for the Laravel 8 application. -
User Registration
This video demonstrates how to implement the user registration feature for the Laravel 8 application. It covers creating routes, handling form validation, encrypting passwords, and displaying flash messages. -
User Login & Middleware
This video demonstrates how to implement the user login feature and middleware for the Laravel 8 application. It covers authentication concepts, creating routes, and securing pages with middleware. -
Dashboard UI
This video demonstrates how to create the dashboard UI for the blog system. It includes integrating a Bootstrap template, creating views, and displaying user-specific posts. -
Create Post Form
This video demonstrates how to create the "Create Post" form for the dashboard in the blog system. It includes adding a button to create posts, building the form view, and implementing features like automatic slug generation and a rich text editor. -
Validation & Insert Post
This video demonstrates how to add validation and insert post data into the blog system. It covers form validation, displaying error messages, saving data to the database, and implementing security for the Trix editor. -
Update & Delete Post
This video completes the CRUD functionality by adding features to update and delete posts in the blog system. It includes creating the update page, handling slug validation, and implementing data modification. -
Upload Image
This video demonstrates how to add an image upload feature to the blog system. It includes creating a file input, configuring file storage, validating images, and displaying uploaded images in posts. -
Preview, Update & Delete Image
This video demonstrates how to add features for previewing, updating, and deleting images in the blog system. It includes implementing a preview functionality, updating existing images, and deleting images from the storage. -
Authorization
This video demonstrates how to add an authorization feature to the blog system. It covers restricting access to certain actions and pages based on user roles or permissions. -
Upload Ke Web Hosting (GRATIS)
This video demonstrates how to upload the Laravel application to free web hosting using 000webhost.com. It covers the steps required to deploy the application and make it accessible online.
This project uses the following resources to aid development:
- Laravel Documentation: The official documentation for Laravel.
- Laracasts: Video tutorials on Laravel and modern PHP development.
- Web Programming UNPAS: The YouTube channel hosting the tutorial playlist.
- Composer: Dependency management for PHP.
- PHP: The programming language used for Laravel.
- Valet for Windows: A development environment for Windows.
- Valet for Linux: A development environment for Linux.
- MySQL Workbench: A visual tool for database design and management.
- Clockwork GitHub: A development tool for debugging and profiling Laravel applications.
- Clockwork Website: Official website for Clockwork.
- Bootstrap Examples: Pre-built Bootstrap templates and examples.
- Eloquent Sluggable: A package for generating slugs in Laravel models.
- Trix Editor: A rich text editor for modern web applications.
The purpose of this project is to provide hands-on experience with Laravel 8 by following a structured tutorial. It covers essential features of Laravel and demonstrates how to build a complete web application.























