9 months ago

Protected Fillable Not working with Vue Axios Patch

Posted 9 months ago by chrisgrim

Hi, I am building a form input and everything is working great. However I wanted to test to make sure my protected fillable was still working and I discovered I could post to my model even when I removed from protected fillable. In my information.php model I have

class Information extends Model
    protected $fillable = [
    public function event() 
        return $this->hasOne(Event::class);

I removed the studentPricing option from the array. However when I patch with Vue

  axios.patch(`${this.eventUrl}/information`, this.details)
                .then(response => {

                .catch(errorResponse => {

it updates my database column student details anyways? Here is my store method on the controller

 public function store(InformationStoreRequest $request, Event $event)


Please sign in or create an account to participate in this conversation.