app/Http/Controllers/DemoContentController.php
/**
     * Display a listing of the resource.
     *
     * @return \Inertia\Response
     */
Display a listing of the resource.
@return \Inertia\Response
Display a listing of the resource . @return \ Inertia \ Response
public function index(Request $request)
    {
        $demoContent = DemoContentResource::collection(DemoContent::tableSearch($request->input('demoSearch')));
        return Inertia::render('Samples/Components/BackEndTable', [
            'demoContent' => $demoContent,
            'searchDataMainProducts' => DemoContent::getRelatedData('main_product_id', 'demo_contents')->get()
        ]);
    }
public function index ( Request $ request ) { $ demoContent = DemoContentResource :: collection ( DemoContent :: tableSearch ( $ request -> input ( 'demoSearch' ) ) ) ; return Inertia :: render ( 'Samples/Components/BackEndTable' , [ 'demoContent' => $ demoContent , 'searchDataMainProducts' => DemoContent :: getRelatedData ( 'main_product_id' , 'demo_contents' ) -> get ( ) ] ) ; }
Display a listing of the resource.
Display a listing of the resource .