Could not open input file: artisan when running php artisan serv - laravel

I'm trying to run an existing laravel project in my new windows.
when I try
php artisan serv
in my project directory, it says
Could not open input file: artisan
I even updated composer
how to configure my old project anyway?

Please run proper command on laravel project root directory:
php artisan serve

Related

How to upload Laravel Project to subdomain without database?

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.

laravel telescope nothing to migrate

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!

How to Install Vue.js in Laravel 6.2

i am using laravel 6.2 and now i want install Vue.js.i am trying like this
composer require laravel/ui.
php artisan ui vue.
php artisan ui vue --auth.
npm install.
npm run dev.
but when i try to run command php artisan ui vue its says Could not open input file: artisan
You cant use php artisan if you are not inside a laravel project folder.
That is why it says 'Could not open input file - artisan'.
You need to be inside laravel folder & make sure that artisan file exist there
If you are on Linux/MAC then use ls command, if you are on Windows then use dir command to check your current directory
You cannot use php artisan if you are NOT inside a laravel project folder.
Just use cd to go to your project_directory and try again

I have downloaded laravel project but it has no artisan file in root directory

I have downloaded laravel project from friends website but it has no artisan file in the root directory.
When I run php artisan list it gives an error:
could not open input file: artisan
Just pull it from here, and test with php artisan
You can't use php artisan if you are not inside your downloaded Laravel project folder. That is why you got an error could not open input file artisan
Go to your project directory using cd command in your command prompt For example: cd YourProjectName, Now you will be able to run php artisan list or php artisan it will display you list of all available commands.
NOTE: If you need Laravel installation then don't download the project on other websites. Always prefer the official document for installation.

file_put_contents(/homepages/storage/framework/views/c8d540ced881ee3d14baa6e1259a7deab143b7fa.php): failed to open stream: No such file or directory

I have a Laravel 5 project that I copied from my friend with FTP to work on it in locally. I ran composer install to install the vendor.
The server is up, but when I enter localhost:8000, it shows me this error:
file_put_contents(/homepages/17/d595652778/htdocs/oneQ/storage/framework/views/c8d540ced881ee3d14baa6e1259a7deab143b7fa.php): failed to open stream: No such file or directory
try this code
php artisan config:cache
It hasn't worked for me:
php artisan config:cache
However this one has worked:
php artisan view:cache
in my case i try to file config.php "delete file bootstrap/cahce/config.php" and its working.
I had a similar issue and i managed to fix it by running:
composer install
from within the project directory or the container if you a using Docker-based development tool such as ddev.

Resources