Answers for "laravel token in url"

PHP
0

current URL without url site laravel

is work
{{Request::path()}}
or
request()->path()
Posted by: Guest on October-24-2020
0

comment = Comment::find($this->route('comment')); in laravel

Schema::create('comments', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->unsigned();
            $table->foreign('user_id')->references('id')->on('users')->onCascade('update')->onDelete('cascade');
            $table->integer('post_id')->unsigned();
            $table->foreign('post_id')->references('id')->on('users')->onCascade('update')->onDelete('cascade');
            $table->text('comment');
            $table->timestamps();
            $table->rememberToken();
        });
Posted by: Guest on October-25-2020

Browse Popular Code Answers by Language