Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

crivion/laraboard-careers

79 stars
2 code files
View crivion/laraboard-careers on GitHub

app/Models/Job.php

Open in GitHub
use Illuminate\Database\Eloquent\Model;
 
class Job extends Model
{
// ...
public function scopeNotExpired($query)
{
return $query->where(function ($query) {
$query->where("expires_at", ">", now())->orWhereNull("expires_at");
});
}
// ...
}

app/Http/Controllers/Front/HomepageController.php

Open in GitHub
use App\Http\Controllers\Controller;
use App\Models\Job;
use Illuminate\Http\Request;
use Inertia\Inertia;
 
class HomepageController extends Controller
{
public function __invoke(Request $request)
{
$jobs = Job::notExpired()
->with('user', 'department', 'location', 'contractType')
->orderByDesc('id')
->applyFilters($request)
->simplePaginate(10)
->withQueryString();
 
// ...
}
}

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.