### Running Laravel CRM Installer (Shell) Source: https://github.com/venturedrake/laravel-crm/blob/master/docs/src/quickstart.md Executes the Laravel CRM package's installation command, which typically handles database migrations, seeding, and other setup tasks. ```shell php artisan laravelcrm:install ``` -------------------------------- ### Copying Environment File (Shell) Source: https://github.com/venturedrake/laravel-crm/blob/master/docs/src/quickstart.md Copies the example environment configuration file (`.env.example`) to the standard environment file (`.env`) for local configuration. ```shell cp .env.example .env ``` -------------------------------- ### Installing Composer Dependencies (Bash) Source: https://github.com/venturedrake/laravel-crm/blob/master/docs/src/quickstart.md Installs the required PHP dependencies for the Laravel project using Composer, based on the composer.json file. ```bash composer install ``` -------------------------------- ### Cloning the Laravel CRM Starter Project (Bash) Source: https://github.com/venturedrake/laravel-crm/blob/master/docs/src/quickstart.md Clones the Laravel CRM starter project repository from GitHub using a shallow clone to quickly get the project files. ```bash git clone --depth=1 https://github.com/venturedrake/laravel-crm-starter.git ``` -------------------------------- ### Configure Routes for Laravel 7 and Below (PHP) Source: https://github.com/venturedrake/laravel-crm/blob/master/docs/src/installation.md Example `routes/web.php` configuration for Laravel 7 and older versions, setting up authentication routes and redirecting the default `/home` route to the root. ```php get('/dashboard', function () { return redirect('/'); })->name('dashboard'); ``` -------------------------------- ### Run Laravel CRM Database Seeder (Bash) Source: https://github.com/venturedrake/laravel-crm/blob/master/docs/src/installation.md Runs the specific database seeder provided by the Laravel CRM package to populate the CRM tables with initial data, such as default roles or settings. ```bash php artisan db:seed --class="VentureDrake\LaravelCrm\Database\Seeders\LaravelCrmTablesSeeder" ``` -------------------------------- ### Linking Storage Directory (Shell) Source: https://github.com/venturedrake/laravel-crm/blob/master/docs/src/quickstart.md Creates a symbolic link from the public directory to the storage directory, making stored files accessible publicly. ```shell php artisan storage:link ``` -------------------------------- ### Require Laravel CRM Package using Composer (Bash) Source: https://github.com/venturedrake/laravel-crm/blob/master/docs/src/installation.md This command adds the `venturedrake/laravel-crm` package as a dependency to your Laravel project using Composer. ```bash composer require venturedrake/laravel-crm ``` -------------------------------- ### Publish Laravel CRM Assets (Bash) Source: https://github.com/venturedrake/laravel-crm/blob/master/docs/src/installation.md Publishes public assets (like CSS, JS, images) for the Laravel CRM package to your application's `public` directory. The `--force` flag overwrites existing assets. ```bash php artisan vendor:publish --provider="VentureDrake\LaravelCrm\LaravelCrmServiceProvider" --tag="assets" --force ``` -------------------------------- ### Running Laravel CRM Tests (Bash) Source: https://github.com/venturedrake/laravel-crm/blob/master/README.md Executes the test suite for the Laravel CRM package using Composer. This command verifies the functionality after installation or upgrades. ```Bash composer test ``` -------------------------------- ### Update User Model with CRM Traits (PHP) Source: https://github.com/venturedrake/laravel-crm/blob/master/docs/src/installation.md Adds necessary traits (`HasCrmAccess`, `HasCrmTeams`, `HasRoles`, `HasLoginsAndDevices`) and implements the `HasLoginsAndDevicesInterface` to the `App\User` model, enabling CRM functionality and access control. ```php use Illuminate\Foundation\Auth\User as Authenticatable; use Spatie\Permission\Traits\HasRoles; use VentureDrake\LaravelCrm\Traits\HasCrmAccess; use VentureDrake\LaravelCrm\Traits\HasCrmTeams; use Lab404\AuthChecker\Models\HasLoginsAndDevices; use Lab404\AuthChecker\Interfaces\HasLoginsAndDevicesInterface; class User extends Authenticatable implements HasLoginsAndDevicesInterface { use HasRoles; use HasCrmAccess; use HasCrmTeams; use HasLoginsAndDevices; // ... } ``` -------------------------------- ### Install Laravel CRM Package - Composer Source: https://github.com/venturedrake/laravel-crm/blob/master/README.md This command uses Composer to require the latest stable version of the venturedrake/laravel-crm package, adding it as a dependency to your Laravel project. ```Bash composer require venturedrake/laravel-crm ``` -------------------------------- ### Upgrading Laravel CRM (>= 0.2) - Step 2 (Bash) Source: https://github.com/venturedrake/laravel-crm/blob/master/README.md Runs the Laravel CRM database seeder to populate necessary data after migrations. This is the second step when upgrading from version 0.2 or higher. ```Bash php artisan db:seed --class="VentureDrake\LaravelCrm\Database\Seeders\LaravelCrmTablesSeeder" ``` -------------------------------- ### Upgrading Laravel CRM (< 0.2) - Step 1 (Bash) Source: https://github.com/venturedrake/laravel-crm/blob/master/README.md Updates the Laravel CRM package via Composer, publishes updated migrations, configuration, and assets, and runs database migrations. This is the initial step when upgrading from a version older than 0.2. ```Bash composer require venturedrake/laravel-crm php artisan vendor:publish --provider="VentureDrake\LaravelCrm\LaravelCrmServiceProvider" --tag="migrations" php artisan vendor:publish --provider="VentureDrake\LaravelCrm\LaravelCrmServiceProvider" --tag="config" php artisan vendor:publish --provider="VentureDrake\LaravelCrm\LaravelCrmServiceProvider" --tag="assets" --force php artisan migrate ``` -------------------------------- ### Run Laravel CRM Seeder - Artisan Source: https://github.com/venturedrake/laravel-crm/blob/master/README.md This Artisan command runs the specific database seeder provided by the Laravel CRM package to populate the newly created tables with initial data, such as default settings or roles. ```Bash php artisan db:seed --class="VentureDrake\LaravelCrm\Database\Seeders\LaravelCrmTablesSeeder" ``` -------------------------------- ### Upgrading Laravel CRM (>= 0.2) - Step 1 (Bash) Source: https://github.com/venturedrake/laravel-crm/blob/master/README.md Updates the Laravel CRM package via Composer, publishes updated migrations, configuration, and assets, and runs database migrations. This is the first step when upgrading from version 0.2 or higher. ```Bash composer require venturedrake/laravel-crm php artisan vendor:publish --provider="VentureDrake\LaravelCrm\LaravelCrmServiceProvider" --tag="migrations" php artisan vendor:publish --provider="VentureDrake\LaravelCrm\LaravelCrmServiceProvider" --tag="config" php artisan vendor:publish --provider="VentureDrake\LaravelCrm\LaravelCrmServiceProvider" --tag="assets" --force php artisan migrate ``` -------------------------------- ### Run Laravel CRM Migrations - Artisan Source: https://github.com/venturedrake/laravel-crm/blob/master/README.md This Artisan command executes the published database migrations, creating all the necessary tables in your database for the Laravel CRM package to function. ```Bash php artisan migrate ``` -------------------------------- ### Upgrading Laravel CRM (>= 0.2) - Step 4 (Bash) Source: https://github.com/venturedrake/laravel-crm/blob/master/README.md Runs a specific Laravel CRM update command to perform any necessary database updates or data migrations required for the new version. ```Bash php artisan laravelcrm:update ``` -------------------------------- ### Publish Laravel CRM Migrations - Artisan Source: https://github.com/venturedrake/laravel-crm/blob/master/README.md This Artisan command publishes the database migration files from the Laravel CRM package to your application's database/migrations directory, allowing you to create the necessary tables. ```Bash php artisan vendor:publish --provider="VentureDrake\LaravelCrm\LaravelCrmServiceProvider" --tag="migrations" ``` -------------------------------- ### Upgrading Laravel CRM (>= 0.2) - Step 3 (Bash) Source: https://github.com/venturedrake/laravel-crm/blob/master/README.md Updates permissions if teams support is being used. This command ensures team-related permissions are correctly configured after the upgrade. ```Bash php artisan laravelcrm:permissions ``` -------------------------------- ### Publish Laravel CRM Config - Artisan Source: https://github.com/venturedrake/laravel-crm/blob/master/README.md This Artisan command publishes the configuration file for the Laravel CRM package to your application's config directory, allowing you to customize settings like the CRM owner and route prefix. ```Bash php artisan vendor:publish --provider="VentureDrake\LaravelCrm\LaravelCrmServiceProvider" --tag="config" ``` -------------------------------- ### Publish Laravel CRM Assets - Artisan Source: https://github.com/venturedrake/laravel-crm/blob/master/README.md This Artisan command publishes the public assets (like CSS, JS, images) from the Laravel CRM package to your application's public directory, making them accessible via the web. ```Bash php artisan vendor:publish --provider="VentureDrake\LaravelCrm\LaravelCrmServiceProvider" --tag="assets" --force ``` -------------------------------- ### Configure Laravel Routes (Laravel 7-) Source: https://github.com/venturedrake/laravel-crm/blob/master/README.md This PHP code snippet shows how to modify the default routes/web.php file for Laravel versions 7 and below to include authentication routes and redirect the default /home route to the CRM's root. ```PHP get('/dashboard', function () { return redirect('/'); })->name('dashboard'); ``` -------------------------------- ### Updating User Model with CRM Traits (PHP) Source: https://github.com/venturedrake/laravel-crm/blob/master/README.md Adds necessary traits (HasCrmAccess, HasCrmTeams, HasRoles, HasLoginsAndDevices) and implements the HasLoginsAndDevicesInterface to the Laravel User model for integrating with the Laravel CRM package and AuthChecker. ```PHP use Illuminate\Foundation\Auth\User as Authenticatable; use Spatie\Permission\Traits\HasRoles; use VentureDrake\LaravelCrm\Traits\HasCrmAccess; use VentureDrake\LaravelCrm\Traits\HasCrmTeams; use Lab404\AuthChecker\Models\HasLoginsAndDevices; use Lab404\AuthChecker\Interfaces\HasLoginsAndDevicesInterface; class User extends Authenticatable implements HasLoginsAndDevicesInterface { use HasRoles; use HasCrmAccess; use HasCrmTeams; use HasLoginsAndDevices; // ... } ``` -------------------------------- ### Referencing the Field Model (PHP) Source: https://github.com/venturedrake/laravel-crm/blob/master/docs/src/reference/custom-fields.md This snippet provides the fully qualified class name for the Eloquent model used to define and manage custom fields within the Laravel CRM application. ```php VentureDrake\LaravelCrm\Models\Field ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.