process-drive/laravel-fetch-data

1.0.0 2022-11-09 04:16 UTC

This package is not auto-updated.

Last update: 2024-04-25 09:42:35 UTC


README

logo.png

ProcessDrive laravel fetch data

This pacakage is used for fetch the particular database value.

Installation

Run this command in your terminal

composer require process-drive/laravel-fetch-data

After Installation

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'];

Note

static keyword is must to include in your variable.

Methods

  1. users::fetchableAll();
  2. users::fetchableGet();
  3. users::fetchableFirst();

License

MIT

has context menu