Skip to content

LaravelCed/laravelPractice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Laravel Practice A Laravel application for learning and practicing Laravel framework features and best practices. πŸ“‹ Table of Contents

About Features Requirements Installation Configuration Usage Project Structure Testing Contributing License

🎯 About This project serves as a practical learning environment for exploring Laravel's capabilities, including routing, controllers, models, migrations, authentication, and more. It's designed to help developers understand Laravel concepts through hands-on implementation. ✨ Features

Authentication & Authorization: User registration, login, and role-based access control CRUD Operations: Complete Create, Read, Update, Delete functionality Database Management: Migrations, seeders, and Eloquent ORM API Development: RESTful API endpoints Form Validation: Request validation and error handling File Uploads: Image and document upload functionality Email Integration: Notification and email sending Task Scheduling: Automated task execution Queue Management: Asynchronous job processing

πŸ”§ Requirements

PHP >= 8.1 Composer MySQL >= 5.7 or PostgreSQL >= 10 Node.js >= 16.x NPM or Yarn

πŸ“¦ Installation

Clone the repository

bash git clone https://github.com/cedkiller/laravelPractice.git cd laravelPractice

Install PHP dependencies

bash composer install

Install JavaScript dependencies

bash npm install

Create environment file

bash cp .env.example .env

Generate application key

bash php artisan key:generate

Configure your database Edit the .env file and set your database credentials:

env DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=your_database_name DB_USERNAME=your_database_user DB_PASSWORD=your_database_password

Run database migrations

bash php artisan migrate

Seed the database (optional)

bash php artisan db:seed

Build assets

bash npm run dev

Start the development server

bash php artisan serve The application will be available at http://localhost:8000 βš™οΈ Configuration Mail Configuration Update your .env file with mail credentials: envMAIL_MAILER=smtp MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=your_username MAIL_PASSWORD=your_password MAIL_ENCRYPTION=tls Queue Configuration For queue processing, update your .env: envQUEUE_CONNECTION=database Run the queue worker: bashphp artisan queue:work Storage Link Create a symbolic link for storage: bashphp artisan storage:link πŸš€ Usage Running the Application Development: bashphp artisan serve With Vite (for hot reload): bashnpm run dev Common Artisan Commands bash# Clear application cache php artisan cache:clear

Clear config cache

php artisan config:clear

Clear route cache

php artisan route:clear

List all routes

php artisan route:list

Create a new controller

php artisan make:controller YourController

Create a new model with migration

php artisan make:model YourModel -m

Run migrations

php artisan migrate

Rollback migrations

php artisan migrate:rollback πŸ“ Project Structure laravelPractice/ β”œβ”€β”€ app/ β”‚ β”œβ”€β”€ Console/ β”‚ β”œβ”€β”€ Exceptions/ β”‚ β”œβ”€β”€ Http/ β”‚ β”‚ β”œβ”€β”€ Controllers/ β”‚ β”‚ β”œβ”€β”€ Middleware/ β”‚ β”‚ └── Requests/ β”‚ β”œβ”€β”€ Models/ β”‚ └── Providers/ β”œβ”€β”€ bootstrap/ β”œβ”€β”€ config/ β”œβ”€β”€ database/ β”‚ β”œβ”€β”€ factories/ β”‚ β”œβ”€β”€ migrations/ β”‚ └── seeders/ β”œβ”€β”€ public/ β”œβ”€β”€ resources/ β”‚ β”œβ”€β”€ css/ β”‚ β”œβ”€β”€ js/ β”‚ └── views/ β”œβ”€β”€ routes/ β”‚ β”œβ”€β”€ api.php β”‚ β”œβ”€β”€ channels.php β”‚ β”œβ”€β”€ console.php β”‚ └── web.php β”œβ”€β”€ storage/ β”œβ”€β”€ tests/ β”‚ β”œβ”€β”€ Feature/ β”‚ └── Unit/ β”œβ”€β”€ .env.example β”œβ”€β”€ artisan β”œβ”€β”€ composer.json β”œβ”€β”€ package.json └── README.md πŸ§ͺ Testing Run the test suite: bash# Run all tests php artisan test

Run specific test file

php artisan test tests/Feature/ExampleTest.php

Run tests with coverage

php artisan test --coverage 🀝 Contributing Contributions are welcome! Please follow these steps:

Fork the repository Create a new branch (git checkout -b feature/amazing-feature) Commit your changes (git commit -m 'Add some amazing feature') Push to the branch (git push origin feature/amazing-feature) Open a Pull Request

πŸ“ License This project is open-sourced software licensed under the MIT license. πŸ“§ Contact Your Name - @cedkiller Project Link: https://github.com/cedkiller/laravelPractice πŸ™ Acknowledgments

Laravel Documentation Laravel Bootcamp Laracasts Laravel Community

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages