I'm new to GitHub and I found this site very useful for a lot of us. I came upon storing my Laravel project here in GitHub, but there's a problem every time I will clone it to be able to go to production, when I'm about to clone it at first, it always shows this error.
Warning: require(C:\xampp\htdocs\tourismPortal\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\tourismPortal\bootstrap\autoload.php on line 17 Fatal error: require(): Failed opening required 'C:\xampp\htdocs\tourismPortal\bootstrap/../vendor/autoload.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\tourismPortal\bootstrap\autoload.php on line 17
I know this will be solved by using composer update on it, but is there any way to prevent this error so that every time I clone it, I will go to production without encountering this error? Thanks, by the way, I'm using tortoisegit
to clone, pull and push.
cd
command on your cmd or terminalcomposer install
on your cmd or terminal.env.example
file to .env
on the root folder. You can type copy .env.example .env
if using command prompt Windows or cp .env.example .env
if using terminal, Ubuntu.env
file and change the database name (DB_DATABASE
) to whatever you have, username (DB_USERNAME
) and password (DB_PASSWORD
) field correspond to your configuration.php artisan key:generate
php artisan migrate
php artisan serve
Yes you can, but that is not recommended at all.
You can delete everything in .gitignore
file and push them from a working project. Then it will work perfectly where you git clone
them.
But there are so many drawbacks in this way. I recommend you not to do that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With