/**
  * Test samples for all models have been seeded.
  */
 public function testModelSeed()
 {
     $message = 'Haven\'t you forgotten to run artisan migrate and db::seed?';
     $this->assertNotEmpty(Author::all(), $message);
     $this->assertNotEmpty(Comment::all(), $message);
     $this->assertNotEmpty(Post::all(), $message);
     $this->assertNotEmpty(Site::all(), $message);
 }
Ejemplo n.º 2
0
 /**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot()
 {
     $menu_right_popular = Blogs::get();
     $menu_right_newest = Blogs::orderBy("id", "desc")->get();
     $menu_right_comment = Comment::all();
     $blog_bottom_footer = Blogs::limit(3)->get();
     view()->share(['menu_right_popular' => $menu_right_popular, 'menu_right_newest' => $menu_right_newest, 'menu_right_comment' => $menu_right_comment, "current_lang" => Session::get("current_lang"), "blog_bottom_footer" => $blog_bottom_footer]);
 }
 public function getCommentFromProject($id)
 {
     $project = Project::find($id);
     if ($project) {
         $comments = Comment::all('*')->get($id);
         return $comments;
     }
 }
 /**
  * Test samples for all models have been seeded.
  */
 public function testModelSeed()
 {
     $message = 'Haven\'t you forgotten to run artisan migrate and db::seed?';
     $this->assertNotEmpty(Author::all(), $message);
     $this->assertNotEmpty(Comment::all(), $message);
     $this->assertNotEmpty(Post::all(), $message);
     $this->assertNotEmpty(Site::all(), $message);
     $isAuthenticated = Auth::attempt(['email' => UsersTableSeeder::SAMPLE_LOGIN, 'password' => UsersTableSeeder::SAMPLE_PASSWORD]);
     $this->assertTrue($isAuthenticated);
 }
Ejemplo n.º 5
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     /*
      *  Parameters are passed just for illustration purposes.
      *  Please note you have to declare allowed parameters in $allowedFilteringParameters field.
      */
     $idxs = $this->getParameters()->getFilteringParameters()['ids'];
     $idxs ?: null;
     // avoid 'unused' warning
     return $this->getResponse(Comment::all());
 }
Ejemplo n.º 6
0
 public function listcomment(Request $request)
 {
     $type = $request->get('type');
     if ($type == 'all') {
         $comments = Models\Comment::all();
     } elseif ($type == 'act') {
         $comments = Models\Comment::where('item_type', '=', 'App\\Models\\Activity')->get();
     } elseif ($type == 'assoc') {
         $comments = Models\Comment::where('item_type', '=', 'App\\Models\\Associate')->get();
     }
     //print_r($comments[0]->item->title);die;
     return view('admin.comment.index', compact('comments'));
 }
Ejemplo n.º 7
0
 public function commentEdit($id, Request $request)
 {
     $request = $request->all();
     if (!isset($request['sira'])) {
         $request['sira'] = "a-z";
     }
     $comment = Comment::find($id);
     //id ile yakalandığım comment
     $allComments = Comment::all();
     return view("comments", ['title' => 'Yorum düzenle: ' . $comment->comment, 'comments' => $allComments, 'request' => $request, 'comment' => $comment, 'sortOptions' => $this->sortOptions]);
 }
Ejemplo n.º 8
0
 public function index()
 {
     return view('admin.comments.index')->with('comments', Comment::all());
 }
 public function index()
 {
     $comments = Comment::all();
     return view('administration.messages')->with(compact('comments'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     return $this->getResponse(Comment::all());
 }
Ejemplo n.º 11
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     //
     return view('admin.comments.index')->withComments(Comment::all());
 }
 /**
  * Send back all comments as JSON
  * @return mixed
  */
 public function index()
 {
     return response()->json(Comment::all());
 }
Ejemplo n.º 13
0
 /**
  * Returns all Comments
  *
  * @return \Illuminate\Database\Eloquent\Collection|static[]
  */
 public function all()
 {
     return Comment::all();
 }