Laravel - 404 in all static files - php

In all the static files (css and js) Apache return 404. Then my Laravel looks like this:
enter image description here
I tri too with the command:
php artisan serve
and the result is the same.
I using PHP 7.2 and Laravel 6.0.4

After installation of fresh laravel 6 follow these steps-
composer require laravel/ui
php artisan ui vue --auth
npm install
npm run dev
php artisan serve
Authentication support is now added with the help of a package. Please read for more details.

Related

Laravel/horizon missing css/js build

The /horizon route from the laravel/horizon package works, but the css and javascript are not loaded.
this is what the road /horizon looks like:
However, I just installed the package and followed the laravel documentation installation
composer require laravel/horizon
php artisan horizon:install
php artisan optimize
npm run dev ( and I tried npm run build,...)
this is my config :
laravel-mix 4.0.7
laravel/horizon 5.14
laravel 8.0
Can you help me ?
Make sure assets are included in your application. Try running the following command.
php artisan vendor:publish --tag=horizon-assets && npm run dev
Resolved with variable environment :
ASSET_URL=/.

Way does't display file css and sass after installed Larvel+vue v.3 compostion Api

I have installed larval v.8 and vuejs version 3 followed by this blog:
https://laraveldaily.com/laravel-8-vue-3-crud-composition-api/
I have run all commands displayed as below:
laravel new project
cd project
// editing .env file here
composer install
php artisan migrate
composer require laravel/breeze
php artisan breeze:install
npm install && npm run dev
but url of the localhost me display as below: Any idea how to solve it??

Laravel 8 - Bootstap ui does not install

In my Laravel 8 application, after installing laravel ui, when I try to run 'php artisan ui bootstrap' I get the following error:
In Bootstrap.php line 70:
copy(C:\xampp\htdocs\netlytics\resources\js/bootstrap.js): Failed to open stream: No such file or directory
I have run composer update successfully.
I have laravel/ui version 3.2.0. I am running Laravel 8.40.0 with PHP 8.0.3.
The site is an old site that I upgraded from Laravel 5.3 and PHP 5.6.
The pre-processing was being done using gulp with a gulpfile.js to configure the mix conversions.
With Laravel 8 I know I need to update my pre-processing to use webpack.mix.js, but so far can't get there.
There is supposed to be a resources/app/bootstrap.js file but it is not showing up and I do not know what it should look like if I wanted to put it there.
Any ideas how to get this installed correctly?
I poked around and finally discovered that I needed to install jQuery and jQuery-ui as well as popper.js. I installed those and again got the same error, but this time I just created a resources/app/bootstrap.js file and when I ran 'php artisan ui bootstrap' it ran and populated the bootstrap.js file.
Here solution:
https://stackoverflow.com/a/68393896/15391779
composer create-project laravel/laravel --prefer-dist laravel-bootstrap
composer require laravel/ui
php artisan ui bootstrap --auth
npm install
npm run dev

Laravel 6 user auth page not working properly

Today I installed laravel 6.x version for a new project.
I have PHP 7.3 in my system so laravel 6 was successfully installed.
Then I run this command to set the Auth UI for VueJS.
artisan ui vue —auth
along with this command:
composer require laravel/ui --dev
But when I checked my login page, it was just an html skeleton.
I checked over the internet and found a solution and tried to run this command,
npm run dev
But still am getting an ugly login page without css and Js files. I checked for CSS and JS files but found no solution.
Anyone please help and tell me how can I setup the front end scaffolding.
Thanks in advance
The command to implement Auth is as follows:
composer require laravel/ui
php artisan ui vue --auth
If your Login and Register page only shows plain HTML. And CSS is not loading properly then run this two command:
npm install
npm run dev
OR
Simply you've to follow this two-step.
composer require laravel/ui
php artisan ui:auth
This will solve your problem for sure!
Check if your npm install shows any deprecation error,
if shows then go to nodejs official site https://nodejs.org/en/ and download and install latest one in your system.
Then in your terminal run:
npm install
npm run dev
That's it.
In your laravel public folder, css and js should have shown after that npm run dev command.
Now your login and register page should be nice looking as expected.
Do one thing,
1) Create app.css and put into project_name/public/css/
2) Create app.js and put into project_name/public/js/
I believe it will work.
If not, make sure you have used these commands before.
npm install
npm run dev
Thanks.

Auth resources are missing in laravel

I want to make use of auth system which comes with the laravel package but the problem is when I make new laravel package using composer i.e composer create-project laravel/laravel project name --prefer-dist
it do not install those auth resources which includes (i.e. auth folder inside resources > views) and also I can't find the Services Folder inside app directory.
All other things are working fine except this authentication system.
What can be the possible problems? Please give me solution
I am working with MAMP.
Taylor Otwell has made it opt-in for Laravel 5.1
You need to run following command after installation
php artisan scaffold:auth
UPDATE
I think this has been answered here
You could also run the command php artisan make:auth in the root directory of you laravel project. I had the same problem and it worked for me.
The command php artisan scaffold:auth didn't work for me i don't know why.
it issued the error:
[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "auth" is not defined.
Did you mean this?
make:auth
in Laravel 5.2 you just have to run this command "php artisan make:auth" and the auth folder will be created
Since laravel 6.* version make:auth is no longer supported, use ui:auth instead.
For deploying ui pack run
composer require laravel/ui --dev
then update composer.json :
composer update -W
and do the:
php artisan ui:auth
You need execute
php artisan make:auth
now if your style css and js are missing
You need load file .css and .js
1) execute in your project
npm install
2) then execute
npm run dev => now in folder /public now exist folder js and css
3) reload page

Categories