I am using Laravel4 and mysql. I want deploy this application in Heroku.
Not sure what steps need to followed to deploy it on Heroku. Because I am using
php artisan commands to create db, seed data into the db.
For eg:
composer dump-autoload
php artisan migrate
php artisan db:seed
Please guide me
Thank all
Related
I am upload project file to Sub Domain. But In web site,just project files is showing. Project is not execute. How can i resolve this problem ?
Subdomain is active.
Your hosting and configuration should have the ff:
Appropriate PHP version compatible to your Laravel project.
Composer and Laravel installed.
Proper web server configuration for Apache, Nginx, Litespeed, etc. This is most likely where your problem is, where you should only expose the /public folder as the only public directory of your page.
I installed composer and I add .env file the run some commands like
php artisan key:generate
php artisan clear-compiled
php artisan cache:clear
php artisan config:clear
php artisan optimize
php artisan route:cache
Then resolved problem.
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
I had developed a Laravel repo in WSL (Windows), and everything was fine.
Later, I bought a laptop with Ubuntu on it and wanted that to be my main development machine. So I downloaded my repo, copied over my various .env files, and set up the MySQL database with the appropriate schemas and users.
But my PHPUnit tests still wouldn't work.
And I was struggling to figure out from the Laravel docs what steps I'd missed.
These were the commands that I needed to run:
php artisan migrate --env=testing
php artisan db:seed --env=testing
Then ./vendor/phpunit/phpunit/phpunit tests/Feature/ worked fine.
P.S. php artisan migrate:refresh --seed --env=testing is also useful to know about.
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!
I'm trying to migrate my auth tables but when i do php artisan migrate nothing happens. It shows no error, nothing.
Before run this command i ran php artisan make:auth and work well.
Thanks
Check if you have migration that were not ran yet. If you have one, run composer dumpauto command to register this migration and then run php artisan migrate again.
You can find all executed migrations in the migrations table.