arctushar
1 year ago

Controller function not working

Posted 1 year ago by arctushar

Hi, I have Controller as below Code

    public function edit(Dsedata $dsedata)
    {
        return $dsedata;
    }

but showing nothing but if I use as below

    public function edit(Dsedata $dsedata)
    {
        return Dsedata::find(1);
    }

showing result, Noted that my url is http://localhost/dsedata/1/edit So what is the problem?

My migration was as below

    public function up()
    {
        Schema::create('dsedatas', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('codelist_id'); 
            $table->decimal('ltp',12,1);
            $table->integer('trade');
            $table->integer('volume');
            $table->date('date');
            $table->time('time');
            $table->unique(['codelist_id','volume','date']);
            $table->timestamps();
        });
    }

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