예제 #1
0
 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();
 }
예제 #2
0
<?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());
예제 #3
0
 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);
 }