Larablog is a blogging project where users can register, post blogs, and engage in conversations with other bloggers. The platform also provides statistics on views and likes for each blog post.
- Laravel: Backend framework
- Bootstrap: CSS framework
- Pusher: Real-time communication
- PHP: Version 7.3
- Node.js: Version 20 or lower
git clone https://github.com/kishangareja0012/larablog.git
cd larablog
Install PHP dependencies:
composer install
Install Node.js dependencies:
npm install
Create a copy of the .env.example
file:
cp .env.example .env
Generate the application key:
php artisan key:generate
Edit the .env
file to set up your database connection:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel-blog
DB_USERNAME=root
DB_PASSWORD=your_password_here
Go to Pusher, create an account, and retrieve your Pusher keys. Then, add them to the .env
file:
PUSHER_APP_ID=your_pusher_app_id
PUSHER_APP_KEY=your_pusher_app_key
PUSHER_APP_SECRET=your_pusher_app_secret
PUSHER_APP_CLUSTER=your_pusher_app_cluster
Run the following command to create the necessary database tables:
php artisan migrate
In one terminal, start the Laravel server:
php artisan serve
In another terminal, compile the frontend assets:
- For development:
npm run dev
- To watch for changes:
npm run watch
- For production:
npm run prod
You are now ready to start using Larablog! Visit http://localhost:8000
in your browser to access the platform.