Sep 19, 2015
0
Level 7
Docblocks
Hi im working on:
Form Requests and Controller Validation
https://laracasts.com/series/laravel-5-fundamentals/episodes/12?autoplay=true#
At the start of this video Jeffrey Way talks about the doc blocks, and shows his for the file. When i use the php doc blocks i get a whole different Markup.I installed idehelper i thought that might help it didn't or i used it wrong, I've been searching on how to use the doc blocks right but i cant find out how to change them to give the same markup that's in line with Laravel.
My phpDoc looks like this:
<?php
/**
* This is a sample function to illustrate additional PHP formatter
* options.
*
* @param $one The first parameter
* @param int $two The second parameter
* @param string $three The third parameter with a longer comment to illustrate
* wrapping.
*
* @return void
* @author J.S.
*
*
* @license GPL
*/
function foo($one, $two = 0, $three = "String")
{
}
?>
This is the file from the lesson to see the diffrence
/**
* Class ArticlesController
* @package App\Http\Controllers
*/
class ArticlesController extends Controller {
/**
* @return \Illuminate\View\View
*/
public function index()
{
$articles = Article::latest('published_at')->published()->get();
return view('articles.index', compact('articles'));
}
/**
* @param $id
*
* @return \Illuminate\View\View
*/
public function show($id)
{
$article = Article::findOrfail($id);
return view('articles.show', compact('article'));
}
/**
* @return \Illuminate\View\View
*/
public function create()
{
return view('articles.create');
}
/**
* @param \App\Http\Controllers\CreateArticleRequest $request
*
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
*/
public function store(CreateArticleRequest $request)
{
Article::create($request->all());
return redirect('articles');
}
}
When others are interested in this subject, I will gather the information and make a post about this subject. Thanks in advance ;)
Please or to participate in this conversation.