for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use GolfLeague\Storage\Match\MatchRepository as MatchRepository;
class MatchEditController extends \BaseController {
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
public function __construct(MatchRepository $matchRepository)
{
$this->matchRepo = $matchRepository;
}
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
return $this->matchRepo->getEditableMatches();
* Show the form for creating a new resource.
public function create()
$view = View::make('editMatch');
return $view;
* Store a newly created resource in storage.
public function store()
//
* Display the specified resource.
* @param int $id
public function show($id)
return $this->matchRepo->getEditable($id);
* Show the form for editing the specified resource.
public function edit($id)
* Update the specified resource in storage.
public function update($id)
// Update
$matchdata = Input::all();
return $this->matchRepo->update($matchdata);
* Remove the specified resource from storage.
public function destroy($id)
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.