PHP code example of afea / filament-positions

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

    

afea / filament-positions example snippets


->plugin(\Afea\Cms\Positions\Filament\PositionsPlugin::make())

use Afea\Cms\Positions\Models\Position;

$byDepartment = Position::query()
    ->active()
    ->with('seo')
    ->get()
    ->groupBy('department');

class PositionApplication extends \Afea\Cms\Positions\Models\PositionApplication
{
    public function scopeNeedsReview($q)
    {
        return $q->pending()->where('created_at', '<', now()->subDays(3));
    }
}

'models' => ['position_application' => \App\Models\PositionApplication::class],