<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>

<p align="center">
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
</p>

# Laravel Leads with filament project

## Step by step

1. **[Install Laravel and Filament](https://github.com/tqt97/laravel-crm-filament/commit/f23830243bacd4772de841d9d503e010ca311566)**

     -  Laravel Installation: ```create-project laravel/laravel laravel-crm-filament```
     - Filament Installation
        ```
            composer require filament/filament
            php artisan filament:install --panels
            php artisan make:filament-user
        ```
     - Logging Into Filament
2. **[Creating Lead Sources Resource](https://github.com/tqt97/laravel-crm-filament/commit/fc2622217ed54bf67d1775b41869820961345696)**
    - Create lead_sources DB structure: Model/Migration and a belongsTo relationship with leads
    - Create Seeds with semi-real data without factories
    - Create a Filament Resource for Lead sources
    - Add a DeleteAction to the table with validation if that record is used
    - Add lead source information to the Lead Resource table/form
    - Divide the menu into two levels: introduce Settings parent menu item
3. **[Creating Leads Resource](https://github.com/tqt97/laravel-crm-filament/commit/3784a997dd0388c3da9d78e2ab65a7252d30ef3a)**
    - Create DB structure for Leads: Model/Migration
    - Create Factories/Seeds for testing data
    - Generate Filament Resource directly from the DB structure
    - Hide the deleted_at column from the table
    - Merge first_name and last_name into one table column
4. **[Creating Tags for Leads](https://github.com/tqt97/laravel-crm-filament/commit/c22677088acbeb812ffd469118bdd63d25350e0e)**
    - Create tags DB structure: Model/Migration and a belongsToMany relationship with leads
    - Create Seeds with semi-real data without factories
    - Create a Filament Resource for Tags
    - Add a ColorPicker field to the form and a ColorColumn column to the table
    - Add a DeleteAction to the table with validation if that record is used
    - Add tags to the Lead form with Select::make()->multiple()
    - Add tags to the Lead table in the same column of name using formatStateUsing() and rendering a separate Blade View
5. **[Pipeline Stages Resource: Reorderable](https://github.com/tqt97/laravel-crm-filament/commit/d2ad40259aeb6ed6c9823f0610e00d4e0dc99df6)**
    - Create pipeline_stages DB structure: Model/Migration and a hasMany relationship to leads
    - Create Seeds with semi-real data without factories
    - Create a Filament Resource for Pipeline Stages
    - Auto-assign the new position to a new Pipeline Stage
    - Make the table reorderable with the position field
    - Add a Custom Action Set Default with confirmation
    - Add a DeleteAction to the table with validation if that record is used
    - Add pipeline stage information to the Lead Resource table/form
6. **[Moving Leads through Pipeline Stages](https://github.com/tqt97/laravel-crm-filament/commit/93410a572e3b6f630e1536e353a921ff1a6d651f)**
    - Create a LeadPipelineStage Model to save the history of the Lead's Pipeline Stage changes and any comments added.
    - Add a custom Table Action to move leads to other pipeline stages.
    - Add creating and updating action Observers to our Lead Model to save the history.
7. **[Leads by Stage: Tabs with Numbers](https://github.com/tqt97/laravel-crm-filament/commit/69b0ebe6d3d79f2afdfb9ca98534f407a8869c48)**
    - Dynamically create tabs for each Pipeline Stage
    - Create a new tab called All to show all Leads
    - Add counters to each tab to show how many Leads are in each group
8. **[SoftDeletes: Archive and Restore Leads](https://github.com/tqt97/laravel-crm-filament/commit/92c4523cd3bc408a8698bced145928043c4e98f8)**
    - Add the Archived tab to the Leads table
    - Add Delete button to the table
    - Add the Restore button to the Archived tab
    - Disable row click on the Archived tab
9. **[Lead View Page with Infolist](https://github.com/tqt97/laravel-crm-filament/commit/59beb89b72011939b720d8a7ef33d3f7c99a717d)**
10. **[Lead Documents: Upload/Download](https://github.com/tqt97/laravel-crm-filament/commit/c18cef80ab740af812dd5cca90f25ae761db6e72)**
11. **[Custom Fields for Leads](https://github.com/tqt97/laravel-crm-filament/commit/db6e66bf036002f98a166fbfabd046bf48262879)**
12. **[Leads in a Draggable Kanban Board](https://github.com/tqt97/laravel-crm-filament/pull/1/commits/59108e001e10868edb3179f6fb8a5afa9e3ae796)**
    - Creating Custom Page - Our Lead Board ```php artisan make:filament-page ManageLeadStages```
13. **[Roles/Permissions: Manage Members](https://github.com/tqt97/laravel-crm-filament/pull/1/commits/ce0a036b750c3e85c7e4dfc966874b182044e354)**
    - Creating Roles Model and Database structure
    - Creating Users Resource
    - Adding Members to Leads
    - Adding Member Changes to Lead History
    - Limiting Member Access
14. **[Member User Invitations Process](https://github.com/tqt97/laravel-crm-filament/pull/1/commits/5b4f7f243d9bea6864c1a272e700079adfd9472e)**
    - Create Invitation Model and Database tables
    - Modify UserResource Create Button Action - to Invite the Member
    - Creating Custom Registration Page
    - Creating and Sending the Email
15. **[Lead Tasks and Calendar View](https://github.com/tqt97/laravel-crm-filament/pull/1/commits/548a24ccfca1ae0acebb61ee493bbcb86edb3e6f)**
    - Create Task Model and Database
    - Add Create Task button to the Lead list
    - Add Task List to the Lead Page
    - Add Task Resource with Tabs
    - Adding Tabs to the Task Resource
    - Add a Calendar Page for Tasks
16. **[Create Lead Quotes with Products](https://github.com/tqt97/laravel-crm-filament/pull/1/commits/c67c35c7b34d96bed30dc25e3014f0223af8e8b1)**
    - Creating the Product Model
    - Creating Product Resource
    - Creating the Quote Model
    - Creating Quote Resource
    - Create Quotes From Lead Table
17. **[Generate Quote PDF](https://github.com/tqt97/laravel-crm-filament/pull/1/commits/6a53532bdabe9cd266524e6e9eaa26cee420c728)**
    - Creating a Simple View Page for Quote
    - Installing PDF Package
    - Generating PDF
    - Displaying PDF in View Page
