public function get_seed() { //Seed DB $project = new Project(); $project->fill(array('name' => 'Test Project Name', 'description' => 'A test project to get started.')); $project->save(); $issue = new Issue(); $issue->fill(array('summary' => "This is a sample issue", 'description' => "This is a description of a sample issue. That's all.", 'reporter' => '*****@*****.**', 'project_id' => $project->id)); $issue->save(); $comment = new Comment(); $comment->fill(array('issue_id' => $issue->id, 'comment' => 'This is a comment', 'commentor' => '*****@*****.**')); $comment->save(); $comment = new Comment(); $comment->fill(array('issue_id' => $issue->id, 'comment' => 'This is another comment', 'commentor' => '*****@*****.**')); $comment->save(); }
<?php // Flyswatter Routes Route::controller(array('flyswatter::home', 'flyswatter::issue', 'flyswatter::seed', 'flyswatter::comment', 'flyswatter::project')); View::share('flyswatter', '/' . Bundle::get('flyswatter')['handles']); View::share('projects', \Flyswatter\Models\Project::all());
public function get_index() { $view_data = array('title' => 'Dashboard', 'projects' => Project::all()); // var_dump(Comment::all()); return View::make('flyswatter::dashboard.start')->with($view_data); }