Difference in files laravel install local & on server - laravel

When I install laravel on the server via the command:
cd httpdocs/ && /opt/plesk/php/7.1/bin/php /usr/lib64/plesk-9.0/composer.phar create-project laravel/laravel --prefer-dist
I am missing files and folders in the laravel directory, which I would have when I install laravel local on my laptop with the command:
composer create-project laravel/laravel --prefer-dist
The commands are the same, but why am I missing files on the server? Example of a missing file: /app/Http/routes.php and missing folder: /app/events/
In both situations laravel works and shows the default laravel page when I visit the url.
Hope to get a clear answer, I couldn't find it on google or here on stackoverflow.

Just tested this. When using composer create-project, it looks like it will use the maximum version it can while satisfying project requirements.
Therefore, if you're installing using PHP 7.1, it will be able to install the latest, Laravel 5.6. However, if you're running create-project using PHP 5.6, it will only attempt to install Laravel 5.4 since Laravel 5.5 requires PHP 7.0 and 5.6 requires 7.1.
This leads me to believe you don't have a recent version of PHP set up on your local system.

Related

Install Laravel 8 without Jetstream

Is there any chance to install Laravel 8 without Jetstream? I want to use Laravel 8 + Inertiajs + Vue.js + Tailwind. Unfortunately Orchid admin panel compatible just with Laravel 8; that's why I have to use Laravel 8.
Yes, you can install laravel 8 without Jetstream, Jetstream is used for Auth, if you decide to create your auth by yourself you are free, or you can use Laravel Breeze if you are anti-Jetstream for Auth
composer create-project laravel/laravel nameofprojectt --prefer-dist
if I get your question very well, that will just install a laravel project without Jetstream
Yes, Laravel 8 is by default getting installed without Jetstream.
You can run the following command to start working without Jetstream.
Windows / MacOS:
curl -s https://laravel.build/example-app | bash
Don't forget to repalce "example-app" with the project/directory name you want to give it.
Laravel installation
Also I recommend to look at Laravel Sail for an easy development server:
Laravel Sail
yeah you can
create project laravel
$ laravel new blog
replace blog by your project name
then go to inertia website, follow the steps and install inertia and vuejs
then install tailwindcss
it's work
Yes you can
with composer
composer create-project laravel/laravel example-app
cd example-app
php artisan serve
First Install new Laravel project using the below command:
composer create-project --prefer-dist laravel/laravel YourProject
After that install InertiaJS in your project. For more information go to the below link:
https://inertiajs.com/server-side-setup
if you have composer installed you can use this command line:
composer create-project laravel/laravel App_Name

Install Laravel using Composer

I'm trying to install Laravel using Composer, but after running the following command
composer create-project laravel/laravel cmsLaravel 5.2
pointing to my c/xampp/htddocs directory, I get the error below:
C:\xampp\htdocs\laravelCMS\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\laravelCMS\bootstrap\autoload.php on line 17
To install Laravel using composer, all you need to do is to run in your terminal is:
composer create-project --prefer-dist laravel/laravel blog
Where: blog is the name of the folder containing your new Laravel instance.
To install Laravel directly within your chosen directory (not in a folder within it as demonstrated above), simply run the same command but this time without a folder name as in:
composer create-project --prefer-dist laravel/laravel
Remember to run the command within your desired directory for the project; in your case, for C:\xampp\htdocs\, then, run either the first or second command as above base on your needs.
This assumes you already have Composer properly installed as recommended on their website.
Before you try addressing your failed to open stream: error, do avoid having folder names with space(s) as in your command above (obviously not the source of the error).
Make sure you have the correct Server Requirements for Laravel
the failed to open stream: error usually occur when the OpenSSL PHP Extension not enabled.
PHP >= 5.6.4
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension
After enabling the required extension(s), do remember to restart your server, then run the following command:
composer update
Follow the steps below;
Download and install Composer.
Go inside the folder C:\xampp\htdocs>(if you are using xampp) or C:\wamp\www>(if you are using wamp) and open cmd/PoweShell & run the following commands:
composer global require "laravel/installer"
composer create-project laravel/laravel (after running this command a folder having name Laravel will be created there)
Now go inside Laravel folder and run php artisan serve command.
After executing the last cmd, it will show an URL: http://127.0.0.1:8000; access the URL in a browser, which should reflect the will see the default webpage of Laravel.
Download and install composer
Run composer global require "laravel/installer"
Open terminal inside C:\xampp\htdocs and run laravel new my_folder_name
You can just run
composer install
and it will process the required files to load the laravel in web browser
EDIT:
After seeing your comment, you should go to your laravel directory in your cmd.
cd C:\xampp\htdocs\laravelCMS
and run the command
composer install
Change your command to this:
composer create-project laravel/laravel cmsLaravel 5.2.*
This mean any sub version of laravel 5.2.
Check your index.php and Change the path as per your project directory
Register The Auto Loader
require __DIR__.'/cmsLaravel /vendor/autoload.php';
$app =require_once __DIR__.'/cmsLaravel /bootstrap/app.php';
composer create-project laravel/laravel 6.0
composer is a tool for dependency management in PHP
create-project is command to create a new laravel project
laravel/laravel is for the skeleton application you get when creating a new project. It provides a default structure that's recommended (you're not forced to use it). The repository contains default config files, controllers, routes, etc. As well as code responsible for bootstrapping the application.
Link Laravel/laravel
6.0 Version in laravel
just run your command line as admin
it worked for me
Please follow this step and try it
step 1
composer create-project laravel/laravel example-app
step 2
composer global require laravel/installer
laravel new example-app
step 3
cd example-app
php artisan serve
Else I will Recommend You To Go in to laravel offical page
Clik Here

how to make php artisan command available?

I read previous posts here about same problem but they did not solve my problem. I am running wamp latest version on windows 7 and I cloned a laravel app from github then I ran composer install on the root folder of the app and all vendors installed. however I still can not execute php artisan list on the app root folder
I tried also this command
composer global require "laravel/installer=~1.1"
but same problem also there is no laravel folder installed inside vendor folder. I dont know what laravel version used with this web app
So how I can make php artisan work ?
Update:
I opened composer.json file and I found no Laravel frame work to install !! should I return to the developer who made this or I just add Laravel package to composer.json and run composer install again ? if so what I should add to the composer.json ? I dont know which version to install !!
Your project has to have an artisan file in the root directory, otherwise the php artisan command won't work.
I had a similar issue. Fixed it by using the following command, which results in a clean installation.
composer create-project --prefer-dist laravel/laravel my-project
If errors occur, your CLI will show them.
Docs

Creating a Laravel project

I have followed a tutorial on Tuts plus called "Getting started with laravel 4". My cygwin and composer works fine. When i try installing laravel using the following command:
$ composer create-project laravel/laravel laravel
i get the following message:
Installing laravel/laravel (v4.2.0)
Downloading: 100%
Created project in laravel
[InvalidArgumentException]
Composer could not find the config file: C:\ProgramData\ComposerSetup\bin
To initialize a project, please create a composer.json file as described in
the http://getcomposer.org/ "Getting Started" section
I have also tried :
composer create-project laravel/laravel project-name --prefer-dist. but same error .
I have tried looking at the Getting Started section but I am not sure what this file should contain in a laravel project?
The correct base composer. json for a laravel project can be found at https://github.com/laravel/laravel/blob/master/composer.json
Learn How To Create Basic Laravel Project | Login & Registration | Projects In Laravel | Tilak Singh
Laravel:
https://laravel.com/
Laravel is a free, open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the model–view–controller architectural pattern and based on Symfony.
Do following steps:
install composer on your system
Download Link: https://getcomposer.org/download/
Run Command:
composer create-project --prefer-dist laravel/laravel project_name
3.after the installation go to project directory and config the .env files
Run Command:
4. composer require laravel/ui
5. php artisan ui vue --auth
6. npm install
7. npm run dev
8. php artisan migrate
9. Run project using: php artisan serve
You can watch videos with step by step:
https://www.youtube.com/watch?v=VDEZnNExDro&t=4s
You can do it by entering this composer command:
$ composer create-project laravel/laravel projectname
This will install the required files under projectname folder

Error installing laravel using composer

I have followed a tutorial on Tuts plus called "Getting started with laravel 4". I have intalled cygwin and composer which works fine. When i try installing laravel using the following command:
$ composer create-project laravel/laravel laravel
i get the following message:
Installing laravel/laravel (v4.2.0)
Downloading: 100%
Created project in laravel
[InvalidArgumentException]
Composer could not find the config file: C:\ProgramData\ComposerSetup\bin
To initialize a project, please create a composer.json file as described in the
http://getcomposer.org/ "Getting Started" section
I have tried looking at the Getting Started section but I am not sure what this file should contain in a laravel project?
Go to
control panel > search for system > view advance system setting > environment variables > under system variable, select composer and delete it > ok> ok.
I think this will solve your problem
You must not create laravel project on your own.
You should go to directory in which you want laravel directory to be created (and laravel directory must not exist) and now you should run:
composer create-project laravel/laravel laravel
laravel directory will be created automatically
I've tried this:
COMPOSER=composer.json composer create-project laravel/laravel c:/laravel --prefer-dist
founded on - Composer could not find the config file.
It works for me!

Resources