Illegal offset type in isset or empty

I DONT KNOW WHAT WRONG IN THIS CODE IN LARAVEL 5.4

PICTUR : https://i.stack.imgur.com/dsb2z.png

code in The CONTROLLER IF NEEDED

public function edit(User $user, $id)
    {
        $user = $user->findOrFail( $id );

        return view( 'admin.user.edit', compact( 'user' ) );

    }
    protected function update(ValideRequestByAdmin $request, User $user)
    {

        //nothing just for test

        return redirect('admin-users-panel');
    }

code in edit.blade.php

<?php
              // send somme variables to forms in laravel collective
              $method = "PUT";
              // for route
              $action = ['admin-users-panel.update', $user->id];
            ?>
            @include('admin.partials.formUser',compact( 'action'))
code in admin.partials.formUser.blade.php

{!! Form::open([
                    'route' => 'tasks.store',
                    'class'=> 'form-horizontal',
                    'role' => 'form',
                    'route' => $action
                ]) !!}

                {{ csrf_field() }}

Which line of the code above does that error message occur in? That is, which is line 266 that the message refers to?

$action = [‘admin-users-panel.update’, $user->id];

AND THANKS FOR REPLY

What is in $user->id if you vardump() it?

/home/vagrant/Code/building/storage/framework/views/044c8b190d4bacdc101434c61837c3e90da6d549.php:58:int 1

man sorry for boring you just give me some free resource to learn laravel well

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.