cheesecake441 / filament-pexels
The best free stock photos, royalty free images & videos shared by creators, now available in Laravel Filament
Fund package maintenance!
cheesecake441
Requires
- php: >=8.1
- filament/filament: >=3.0
- filament/forms: >=3.0
- spatie/laravel-package-tools: ^1.15.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.1
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
README
The best free stock photos, royalty free images & videos shared by creators, now available in Laravel Filament
Installation
You can install the package via composer:
composer require cheesecake441/filament-pexels
You'll need to grab a pexels API key from https://www.pexels.com/onboarding/
Then add the key to your projects .env file:
PEXELS_API_KEY=""
Finally, paste the below into your projectsconfig/services.php
file
'pexels' => [ 'key' => env('PEXELS_API_KEY'), 'base_url' => 'https://api.pexels.com/v1/', ],
Usage
Usage in Admin Panel:
use Cheesecake441\FilamentPexels\PexelsImageUpload; public static function form(Form $form): Form { return $form->schema([ ->PexelsImageUpload::make('image_path') ]); }
IMPORTANT: Make sure the name of the component matches the name of your image column (e.g. $record->image_path)
Check API Usage
$ php artisan pexels:usage
Credits
License
The MIT License (MIT). Please see License File for more information.