コード例 #1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int $id
  * @return Response
  */
 public function edit($id)
 {
     $event = $this->eventRepository->findById($id, ['photos']);
     $tags = $this->tagRepository->getList('name_ar', 'id');
     $dbTags = $event->tags->lists('id');
     $category = $this->select + $this->categoryRepository->getEventCategories()->lists('name_ar', 'id');
     $author = $this->select + $this->userRepository->getRoleByName('author')->lists('username', 'id');
     $location = $this->select + $this->locationRepository->getAll()->lists('name_ar', 'id');
     $this->render('admin.events.edit', compact('event', 'category', 'author', 'location', 'dbTags', 'tags'));
 }
コード例 #2
0
 /**
  * Show the form for editing the specified resource.
  * @param $id
  * @internal param $post
  * @return Response
  */
 public function edit($id)
 {
     $title = Lang::get('admin.blogs.title.blog_update');
     $category = $this->select + $this->categoryRepository->getPostCategories()->lists('name_ar', 'id');
     $author = $this->select + $this->userRepository->getRoleByName('author')->lists('username', 'id');
     $post = $this->blogRepository->findById($id);
     $tags = $this->tagRepository->getList('name_ar', 'id');
     $dbTags = $post->tags->lists('id');
     // Show the page
     $this->render('admin.blogs.edit', compact('post', 'title', 'category', 'author', 'tags', 'dbTags'));
 }