I created a new project and added a Jetstream. After that i used jetstrap to swap for using bootstrap. But the page is very shapeless as an images:
how to fix this problem, if you help me i will be glad
Try to install bootstrap on your laravel project with the followings:
composer require laravel/ui
php artisan ui bootstrap
npm install && npm run dev
If you don't see any changes, try to clear the browsing data and/or clear the project cache, with:
php artisan cache:clear
and
php artisan view:clear
Related
I am new in laravel development. I am using latest version 9 of laravel, when I write php artisan serve in git bash or in VS code terminal after sometime it gives an error. I attached a screenshot of an error.
run php artisan optimize command
composer install
composer update
php artisan optimize:clear
This will clear all the cache of the application
My app just displays the html code in the browser. It worked fine. I was actually working on an update when I noticed the view didn't seem to refresh, so I cleared cookies in my browser. That didn't work so I ran php artisan view:clear. It was still not working, so I just wanted to reset and clear all cache and ran php artisan optimize:clear. After attempting to reset and cache everything the view been messed up and all I see is the html in the browser. I have tried what I feel like is every artisan command, php artisan config:clear
php artisan config:clear and cache, php artisan view:clear and cache
php artisan route:clear and cache, php package:discover, livewire:discover, composer dump-autoload, - delete all in bootstrap cache, sudo rm -rf vendor/ , sudo rm composer.lock composer install, npm install, npm run dev, reinstall everything. I even just decided to clone a whole new project from the repo. Composer install, npm install, npm run dev and still the save exact issue. Help is appreciated. The routes still seem to work on the navbar, it is just the views. Thanks!
UPDATE: Another developer cloned the project on their computer and it works fine. Still can't get it to work on mine.
I have also encountered the same issue. It happens because of having an HTML comment at the beginning of the livewire blade component. For example,
<!-- <div> -->
Remove the HTML comment and it will resolve the issue.
Enclose all your livewire components blade code inside a parent div tag. I think it will solbe your issue.
Check this:
enter link description here
I was also having this problem, and realized that the config for manifest_path was pointing to the wrong directory. As you can see, /tmp/storage/bootstrap/cache doesn't exist for a fresh Laravel install on a local machine so it can't ever find it.
The solution is to publish the config with php artisan vendor:publish --tag=livewire:config and then change manifest_path to the appropriate path, mine being \bootstrap\cache\livewire-components.php.
Hope this helps!
I have cloned a laravel project from github and when I try to use it on my localhost, all I see is the homepage, which is fully functional, but has bits of content and images missing. Then if I try to go to any other route I get an error saying The requested URL was not found on this server.
For reference I am using MAMP as the web server, I have checked the httpd file and everything seems okay, anyone got a clue what's going on?
Use these commands in order :
cp .env.example .env
composer install
php artisan key:generate
php artisan migrate:fresh --seed
npm install
npm run dev
php artisan serve
I need to connect React.js to Laravel 7.23 project with UIkit.css framework.
Standard solution
composer require laravel/ui
php artisan ui react
php artisan ui react --auth
npm install
But, this solution includes bootstrap.css framework which I do not need.
I also found
php artisan preset react
But on execution I get "Command "preset" is not defined."
laravel-ui is the new laravel frontend Scaffolding library. php artisan preset is no longer supported.
php artisan ui react will give you the react Scaffolding. There is no default option for UIkit.css If you do not need bootstrap just remove it and add something you want.
Hope that answers all your concerns.
For installing react in laravel 7, refer to documentation
Install laravel ui composer package
composer require laravel/ui
Install react
php artisan ui react
Install react with auth
php artisan ui react --auth
Make sure you run npm install and npm run dev
i have a laravel 6 app that i want to install the telescope in that i did all the commands like composer update and composer dump-autoload and then i install the telescope every thing is going fine and when i run php artisan telescope:install i get the message below :
Publishing Telescope Service Provider...
Publishing Telescope Assets...
Publishing Telescope Configuration...
Telescope scaffolding installed successfully.
but it wont generate the config file and migration so when i run php artisan migrate i get this message :
nothing to migrate
in your command
php artisan vendor:publish --tag=telescope-migrations
then edit you your env file
TELESCOPE_ENABLED=true
after this run
php artisan optimize
Finally
php artisan migrate
You must publish it first using the below command:
php artisan vendor:publish --tag=telescope-migrations
Then you will get the default migrations and also the config/telescope.php file
After installing the telescope in my project and exporting the default migration I got this error.
λ php artisan vendor:publish --tag=telescope-migrations
Unable to locate publishable resources.
Publishing complete.
How I solve this issue
If you're getting this issue open telescope.php file which is inside of your config directory.
and then set the value of this TELESCOPE_ENABLED to true
'enabled' => env('TELESCOPE_ENABLED', true),
Because in my case the value of TELESCOPE_ENABLED this was false
Then again run this command php artisan vendor:publish --tag=telescope-migrations.
I hope it will work :)
I had accidentally ran php artisan optimize in my local environment which was causing this issue. To fix it, I had to run php artisan optimize:clear, then uninstall laravel/telescope, remove any references to it, and install it again from scratch. It then recognised the migrations and the published assets.
I did this
composer remove laravel/telescope
Then change your .env file
TELESCOPE_ENABLED=true
Then install back again it worked!