This pacakage is used for fetch the particular database value.
Run this command in your terminal
composer require process-drive/laravel-fetch-data
you must be add in you model file
use ProcessDrive\LaravelFetchData\FetchDataTraits;
Next add inside your model class
use FetchDataTraits;
example :
class users extends Model
{
use FetchDataTraits;
}
Then next declare in you variable name
example:
protected static $fetchable = ['username','email','password'];
static keyword is must to include in your variable.
- users::fetchableAll();
- users::fetchableGet();
- users::fetchableFirst();
MIT
has context menu