Skip to content

processdrive/laravel-fetch-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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