Your ROOT_URL in app.ini is http://159.89.207.79:3000/ but you are visiting http://9.cron.my.id:3000/mahesh/voyager-cms/blame/commit/71c632616b0c4250404c56af80e3dd30efc5ce22/app/Http/Controllers/HomeController.php You should set ROOT_URL correctly, otherwise the web may not work correctly.

32 lines
779 B

2 years ago
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Models\Slider;
class HomeController extends Controller
{
public function index(){
// $menu = DB::select('select * from menu_items where menu_id=2 ORDER BY order ASC');
$menu = DB::table('menu_items')
->where('menu_id',2)
->orderBy('order', 'asc')
->get();
$sliders = DB::table('sliders')
->where('status',1)
// ->orderBy('order', 'asc')
->get();
$about = DB::table('pages')
->where('slug','about')
// ->orderBy('order', 'asc')
->get();
$services = '';
return view('index',['items' => $menu,'sliders' => $sliders,'about' => $about,'services' => $services]);
}
}