app/Http/Controllers/TiposCompraController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
         $tipo_compra= Tipos_compra::where('estado',1)->get();
         return response()->json($tipo_compra);
    }
public function index ( ) { $ tipo_compra = Tipos_compra :: where ( 'estado' , 1 ) -> get ( ) ; return response ( ) -> json ( $ tipo_compra ) ; }
Display a listing of the resource.
Display a listing of the resource .