You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Project extends Model
{
use Rememberable;
public $rememberCacheTag = 'project_queries';
public $rememberFor = 60*60*24;
public function users()
{
return $this->morphToMany(User::class, 'model','model_has_users');
}
User.php
class User extends Authenticatable
{
use Rememberable;
public $rememberCacheTag = 'user_queries';
public $rememberFor = 60*60*24;
public function projects()
{
return $this->hasMany(Project::class);
}
Project.php
User.php
Now this works:
And this does not:
Project::find(1)->name (refreshed)
Project::find(1)->users (not refreshed)
help!?
The text was updated successfully, but these errors were encountered: