I have created the new controller using command line on laravel
php artisan make:controller PhotoController --resource
just display the string on a function of PhotoController like below
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class PhotoController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function getName()
{
echo 'Dev';
}
Called the controller on route web.php
Route::get('photos', 'PhotoController@getName');
When i trying to load the url of controller
http://localhost/dev_laravel/public/photos
getting 404 Not found error
I also tried
http://localhost/dev_laravel/public/photo/
http://localhost/dev_laravel/public/photo/getname/
I'm beginner or learner for laravel and working on 5.8 version
php artisan route:list
after
Can anyone help me?