Hello lads,
I've got a quick question.
I'm using the public property:
public $modelId = null
Then in the mount function I do this.
public function mount(Model $model)
{
$this->authorize('view', $model);
$this->modelId = $model->id;
}
Whenever I am using the model on a page i use computed properties:
public function getModelProperty()
{
return Model::find($this->modelId);
}
Then later on when I have for example a update function.
public function update()
{
$this->authorize('update', $this->model);
// update the shizzle
}
Just making sure, the public $modelId CANNOT be manipulated trough JS or the browser right?
(The check-sum will make sure of that)
Meaning that everything is authorized correctly in this case?