Skip to content

Instantly share code, notes, and snippets.

@pekhota
Created March 29, 2016 13:33
Show Gist options
  • Save pekhota/8a9ce483fc5198bff9e8 to your computer and use it in GitHub Desktop.
Save pekhota/8a9ce483fc5198bff9e8 to your computer and use it in GitHub Desktop.
<?php
namespace App\Http\Controllers\Traits;
use App\Exceptions\NotSupportedMethodException;
use Illuminate\Http\Request;
use App\Http\Requests;
trait ResourceTemplate
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
throw new NotSupportedMethodException('not supported');
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
throw new NotSupportedMethodException('not supported');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
throw new NotSupportedMethodException('not supported');
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
throw new NotSupportedMethodException('not supported');
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
throw new NotSupportedMethodException('not supported');
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
throw new NotSupportedMethodException('not supported');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
throw new NotSupportedMethodException('not supported');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment