for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Colligator\Http\Controllers;
use Colligator\Collection;
use Colligator\Http\Requests\CreateCollectionRequest;
class CollectionsController extends Controller
{
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
return response()->json([
'collections' => Collection::all(),
]);
}
* Display the specified resource.
* @param int $id
public function show($id)
$collection = Collection::findOrFail($id);
'collection' => $collection,
* Show the form for creating a new resource.
public function create()
// return view('collections.create');
* Store a newly created resource in storage.
public function store(CreateCollectionRequest $request)
$request
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
// dd($request->name);
* Show the form for editing the specified resource.
public function edit($id)
$id
//
* Update the specified resource in storage.
public function update($id)
* Remove the specified resource from storage.
public function destroy($id)
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.