PHP code example of starfolksoftware / gauge

1. Go to this page and download the library: Download starfolksoftware/gauge 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/ */

    

starfolksoftware / gauge example snippets


Gauge::ignoreMigrations();

Gauge::useReviewModel('App\\Models\\CoolReviewModel');

Gauge::useUserModel('App\\Models\\UserTestModel');

Gauge::useReviewsTableName('reviews_table');

Gauge::supportsSoftDeletes();

Gauge::supportsSingleReviews();

Gauge::supportsTeams();

use StarfolkSoftware\Gauge\Reviewable;

class Item extends Model
{
    // ...
    use Reviewable;
    // ...
}

$branch->review($user, $rating, $comment)

use StarfolkSoftware\Gauge\TeamHasReviews;

class Team extends Model
{
    use TeamHasReviews;

    protected $table = 'teams';
}

$team->reviews()->save([
    //...
]);

$team->reviews
bash
php artisan gauge:install