Loading...
- Registration & Login
- Projects CRUD with sorting, filtering and pagination
- Tasks CRUD with sorting, filtering and pagination
- Create Tasks inside project
- Show all tasks or show tasks for a specific project
- Assign users to tasks
- View Tasks assigned to me
- Show dashboard with overview information
- Clone the project
- Navigate to the project's root directory using terminal
- Create
.env
file -cp .env.example .env
- Execute
composer install
- Execute
npm install
- Set application key -
php artisan key:generate --ansi
- Execute migrations and seed data -
php artisan migrate --seed
- Start vite server -
npm run dev
- Start Artisan server -
php artisan serve
Before you begin, ensure you have met the following requirements:
- PHP >= 8.2
- Composer
- Laravel 11
- npm or yarn
This README provides a comprehensive overview of the Laravel React Inertia project, outlining its setup and key features. Below, you'll find step-by-step instructions along with code snippets to guide you through the project's development.
To get started, follow these steps to install Laravel Breeze and set up the project environment:
- Install Laravel Breeze:
composer require laravel/breeze --dev
- Run Breeze Installation:
php artisan breeze:install
- Choose React and Dark Mode options during installation.
To enable Dark Mode in your project, follow these steps:
- Open resources/layouts/app.blade.php.
- Add the dark class to the HTML tag:
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="dark">
- open tailwind.config file and add this:
export default { darkMode: 'class',
- To enable email verification for users, follow these steps:
Implements MustVerifyEmail
interface in the User model. If the.env
file is not configured for email, verification links will be logged tostorage/logs/laravel.log
. Users can use this link to confirm their email and access the dashboard.
- Create migrations, projects, tasks.
- establish projects has many tasks relationship.
- create factories for projects and tasks.
- seed them in database seeder.
php artisan make:controller ProjectController --model=Project --requests --resource
$ php artisan make:controller TaskController --model=Task --requests --resource
$ php artisan make:controller UserController --model=User --requests --resource
- Remove the welcome and login routes and redirect to dashboard on
/
Route::redirect('/', '/dashboard');
- Dashboard route in middleware and using arrow function
Route::middleware(['auth', 'verified'])->group(function() { Route::get('/dashboard', fn () => Inertia::render('Dashboard')) ->name('dashboard'); });
- Resource routes for all three controllers
Route::resource('project', ProjectController::class); Route::resource('task', TaskController::class); Route::resource('user', UserController::class);
- In .editorconfig file, make the identation_size 2
[*.{js, jsx}] indent_size = 2
- Highlight the active navbar or route
<NavLink href={route("dashboard")} active={route().current("dashboard")} > Dashboard </NavLink>
To contribute to Project, follow these steps:
- Fork this repository.
- Create a branch:
git checkout -b <branch_name>
. - Make your changes and commit them:
git commit -m '<commit_message>'
- Push to the original branch:
git push origin <project_name>/<location>
- Create the pull request.
Alternatively, see the GitHub documentation on [creating a pull request].
If you want to contact me you can reach me at [email protected].