Laravel load settings from database
问题 I'm looking for an efficient way to load settings/configuration from the database with Laravel 5. Settings consist of a key and value column, the model class basically looks like this: <?php namespace App; use Illuminate\Database\Eloquent\Model; class Setting extends Model { protected $table = 'settings'; protected $fillable = ['key', 'value']; protected $primaryKey = 'key'; } At first I made a simple helper function which does the job. The problem is, this would lead to multiple calls per