No query results for model [App\Requisition].

Posted 9 months ago by irankhosravi

When I go to address http://localhost:8000/requisitions/5/edit I get this error.

No query results for model [App\Requisition].

Of course I putted use App\Requisition; in my code.

namespace App\Http\Controllers\Admin;

use App\School;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Alert;
use App\Requisition;

class RequisitionController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function create()
    {
        
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request $request
     * @return \Illuminate\Http\Response
     */
    public function store(Request $request)
    {
        
    }

    /**
     * Display the specified resource.
     *
     * @param  \App\Requisition $requisition
     * @return \Illuminate\Http\Response
     */
    public function show(Requisition $requisition)
    {
        //
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param  \App\Requisition $requisition
     * @return \Illuminate\Http\Response
     */
    public function edit(Requisition $requisition)
    {
        return 'helloworld';
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request $request
     * @param  \App\Requisition $requisition
     * @return \Illuminate\Http\Response
     *
     */

    public function update(Request $request, $requisition)
    {
        
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param Request $request
     * @return \Illuminate\Http\Response
     */

    public function unapproved(Request $request, $id)
    {
        
    }
}

I tried just want to show this helloworld.

we.php

Route::resource('requisitions', 'RequisitionController');

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.