/** * Run the database seeds. * * @return void */ public function run() { // Add the basic point types PointType::create(['name' => 'start', 'color' => '#91CA62']); PointType::create(['name' => 'decision', 'color' => '#54687D']); PointType::create(['name' => 'ending', 'color' => '#C6394D']); }
/** * Get the modal that adds a start point for a storyline * * @param int $line_id * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function add_start($line_id) { // Get all available point types $point_type = PointType::where('name', 'start')->first(); // Get all available story lines $story_line = Storyline::where('id', $line_id)->first(); return view('forms.point_add_start', ['point_type' => $point_type, 'story_line' => $story_line]); }