mercredi 12 octobre 2016

how to sent project id to the database in Laravel 5.2

I need insert some project id which display in My web browser address bar I am using Laravel 5.2

lacalhost:8000/project/06

I need to insert this number 06 to project_id column of gantt_task table.

this is My GanttController

<?php
namespace App\Http\Controllers;
use App\GanttTask;
use App\GanttLink;
use Dhtmlx\Connector\GanttConnector;

class GanttController extends Controller
{
    public function data() {
        $connector = new GanttConnector(null, "PHPLaravel");
        $connector->render_links(new GanttLink(), "id", "source,target,type");
        $connector->render_table(new GanttTask(),"id","start_date,duration,text,progress,parent,project_id");
    }

}

this is My Gantttask Model

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;

class GanttTask extends Model
{
    protected $table = "gantt_tasks";
    public $primaryKey = "id";
    public $timestamps = false;
}


 can you give me some solutions?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire