PHP code example of ali-sharafi / laravel-tickets

1. Go to this page and download the library: Download ali-sharafi/laravel-tickets library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ali-sharafi / laravel-tickets example snippets


//web.php
use LaravelTickets\LaravelTickets;

LaravelTickets::routes(); //For main routes 
LaravelTickets::api(); // For admin routes

LaravelTickets::routes([
    'middleware' => 'foo',
    'prefix' => 'bar'
]);

//User.php

use LaravelTickets\Traits\HasTickets;

class User extends Authenticatable
{
    use HasTickets;
}
bash
php artisan migrate
bash
php artisan vendor:publish --tag=tickets-config
bash
php artisan vendor:publish --tag=tickets-views
bash
php artisan tickets:admin-ui vue