1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Improved permission regen performance by factor of 4

Worked around slower eloquent access to speed up permission generation.
This commit is contained in:
Dan Brown
2016-04-30 17:16:06 +01:00
parent 9a31b83b2a
commit 59367b3417
16 changed files with 49 additions and 60 deletions

19
app/Model.php Normal file
View File

@ -0,0 +1,19 @@
<?php namespace BookStack;
use Illuminate\Database\Eloquent\Model as EloquentModel;
class Model extends EloquentModel
{
/**
* Provides public access to get the raw attribute value from the model.
* Used in areas where no mutations are required but performance is critical.
* @param $key
* @return mixed
*/
public function getRawAttribute($key)
{
return parent::getAttributeFromArray($key);
}
}