I have sub folders inside my view folder called
JavaScript
x
--views
---saledata(folder)
----saled.blade.php
---uploader(folder)
----datauploader.php
---home.blade.php
I want to route this saled.blade.php and datauploader.php files in web.php
I have tried with
JavaScript
route:: view('saledata','../saledata/saled');
route:: view('datauploader','datauploader');
in both the ways.but both shows 404 errors.
and this is the way I mentioned the url of the file in home.blade.php
JavaScript
<a href="{{ url('saledata') }}" title="">
So please help to resolve this
Advertisement
Answer
if directly form the web file :
JavaScript
Route::get('saledata', function () {
return view('saledata.saled');
});
if want to use in the controller:
JavaScript
public function index(Request $request) {
return view('saledata.saled');
}