wontoneesaju
1 year ago

issue with the model

Posted 1 year ago by wontoneesaju

I am facing one issue my model are not binding with the input values

this is my model

namespace App\Model\Setup;

use Illuminate\Database\Eloquent\Model;

class Venueinfo extends Model { //

//use Notifiable;
protected $table="venue_info";

/**
 * The attributes that should be hidden for arrays.
 *
 * @var array
 */
protected $fillable =[
    'venue_name','venue_businessname','venue_type,','venue_taxid'
];

public $timestamps = false;

}

// save all data $venueid=Auth::user()->id; // object of venue info /* $venueinfo=new Venueinfo; $venueinfo->id=$venueid;

    $venueinfo->venue_name=Input::get('vname');
    $venueinfo->venue_businessname=Input::get('bname');
    $venueinfo->venue_type=Input::get('vtype');
    $venueinfo->venue_taxid=Input::get('taxid');
    $venueinfo->save();
    */
    \App\Model\Setup\Venueinfo::where('id',$venueid)->delete();
    \App\Model\Setup\Venueinfo::create([
        'venue_name' => Input::get('vname'),
        'venue_businessname' => Input::get('bname'),
        'venue_type' => Input::get('vtype'),
        'venue_taxid' => Input::get('taxid')
    ]);

if i will print Input::get('vname'); this will display the values but when i am binding it with the model i dont know its not fetch data,

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