PHP code example of laravel / roster
1. Go to this page and download the library: Download laravel/roster 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/ */
laravel / roster example snippets
use Laravel\Roster\Roster;
$roster = Roster::scan($directory);
use Laravel\Roster\Packages;
// Get all packages
$roster->packages();
// Get only packages that will be used in production
$roster->packages()->production();
// Packages that are only used for dev
$roster->packages()->dev();
// Check if a package is in use
$roster->uses(Packages::INERTIA);
// Check if a particular version of a package is in use
$roster->usesVersion(Packages::INERTIA, '2.0.0', '>=');
// Detect which JavaScript package manager is in use
$packageManager = $roster->nodePackageManager();