Welcome to Laravel. Can you please share your web.php file?
Total noob, index page won't load
I want to get started with Laravel, so I am following the initial Laravel Bootcamp tutorial for Blade (keep it simple) but when I add the most elementary "return 'Hello, World!';" line to ChirpController.php and a Route::resource (from the tutorial) to routes/web.php I'm getting a 404 when I go to /chirps. I have registered as a user and the /dashboard URL says I am logged in, so something is working.
What is confusing is that the tutorial says to kick things off with "npm run dev" which gets me some default page at localhost:5173 compared to better results for "php artisan serve" on localhost:8000.
First question: is the references to "npm run dev" incorrect in the tutorial, should it be "php artisan server" instead?
After initial difficulties, I successfully completed the first two sections of the Chirps Blade tutorial on my third attempt. The expected "Hello World!" output now appears at http://127.0.0.1:8000/chirps. While I can proceed with the tutorial, I'm uncertain about what caused the issues in my previous attempts, both recently and a year ago.
However, when I moved on to the next "03. Creating Chirps" section I got another error that $chirps was unknown. Either I am really dumb (quite likely) or the bootcamp tutorials are not well tested. Even Cline could not help me. Rather than totally give up, yet again, I searched through GitHub for completed Chirper projects and after cloning and testing a dozen broken repositories, I found one by m0ohannad that has all FOUR examples, all working and recently updated. Many thanks to you m0ohannad!
So to help any future Laravel noobs that land on this thread from Google, go to these GitHub repositories and check them out and give them a star...
https://github.com/m0ohannad/Build-Chirper-with-Blade
https://github.com/m0ohannad/Build-Chirper-with-Livewire
https://github.com/m0ohannad/Build-Chirper-with-Vue
https://github.com/m0ohannad/Build-Chirper-with-React
# Example usage for the Blade repository
git clone https://github.com/m0ohannad/Build-Chirper-with-Blade
cd Build-Chirper-with-Blade
cp .env.example .env
touch database/database.sqlite
composer install
npm install
php artisan key:generate
php artisan storage:link
php artisan migrate
npm run build # or 'dev' in another shell
php artisan serve
Please or to participate in this conversation.