Issue Creating Laravel app - laravel-5

I'm new to using command line tools. I'm trying to setup laravel 5 on a mac.
Every time I try to install a new app, I'm getting the following error:
"Could not open input file: composer.phar"
I thought I had installed composer in the global bin. Any suggestions?

Problem is you didnt move your .phar file to your path
check this link Laravel document
or Laravel official video
its will help you

Related

Laravel New Project_Name command not working after updating laravel 6

Screenshot of CMD
laravel cmd command : laravel new blog
not working. its showing an error, I have added picture of cmd, kindly check and give me solution
Make sure to place Composer's system-wide vendor bin directory in your $PATH so the laravel executable can be located by your system. This directory exists in different locations based on your operating system; however, some common locations include:
macOS and GNU / Linux Distributions: $HOME/.config/composer/vendor/bin
Windows: %USERPROFILE%\AppData\Roaming\Composer\vendor\bin
Reference the docs
https://laravel.com/docs/6.x
youtube
https://www.youtube.com/watch?v=eD4yMI-IR8g
Laracasts
https://laracasts.com/series/laravel-6-from-scratch/episodes/3

Is there any problem with naming my laravel project as crm

I try to create a laravel project named crm and got this error.
[InvalidArgumentException]
Project directory crm/ is not empty
I am using windows system. I have tried to name it in capital letters but got the same error
Yes its because the path which you are trying to create the laravel application
already has the same folder that is not empty
So If You need to create a laravel app by overwriting it
Try
laravel new crm --force
So --force will Forces install even if the directory already exists

Simplest way to get Laravel "Hello World" going?

I have programmed in PHP for many years, but it was before frameworks like Laravel. I am trying to understand Laravel now.
Can someone point me to something that explains the simplest possible way to get a Laravel "Hello World" app running. I know how to use composer. I have a Linux shared hosting account I can use for this.
I'd appreciate if someone could explain how I can get a simple Laravel example up and running, without having to install a ton of stuff on my PC.
Thanks.
Using composer download the latest version of laravel. Documentation is available at https://laravel.com/docs/5.8
composer create-project --prefer-dist laravel/laravel hello
After that go to that directory
cd hello
and run this command
php artisan server
Now open the browser and go to http://127.0.0.1:8000/
You will get a basic page that says Laravel and some links
Open hello with your code editor and open this file resources/views/welcome.blade.php
Write some content on the page and check http://127.0.0.1:8000/
You can watch the https://laracasts.com/series/laravel-from-scratch-2018 to get a basic idea.
(Optional) If you are in windows you can use https://laragon.org/ in that the installation is pretty easy.
To run this app on shared hosting.
First,
1) Create a folder Application on your file manager
2) Upload files to that folder. (Laravel files, installed via composer)
3) Move public folder files to /public_html/ if you want the site in root domain
4) open index.php file and edit these lines
require __DIR__.'/Application/vendor/autoload.php';
....
$app = require_once __DIR__.'/Application/bootstrap/app.php';

Class 'Stripe\Stripe' not found error in PHP

I installed laravel and composer and created my first project in laravel. I want to integrate stripe using PHP. When I try to execute my first project in localhost I take this message:
Fatal error: Class 'Stripe\Stripe' not found in C:\xampp\htdocs\laravel\stripe\public\elda.php on line 21
To include the stripe libraries, I inserted inside the composer.json file the code from the API library for PHP. Here is an image of my composer.json file:
I run composer install in cmd and this is the output:
You may be getting outdated dependencies. Run update to update them.
I run composer update and the output is the error in the image below:
Can someone help me to solve this error?
Well, sorry did not make a comment of your post, but I have not enough points to do so. But you need to run composer install in the terminal after that includes a new package.
I had the same issue, but when I ran this command my issue is resolved.
composer require stripe/stripe-php
I hope this may help you, after you update your composer.

Installing the Joomla Framework

I am trying to install the Joomla 1.0 framework onto a project I am working on.
I did a build from composer, and github both with no dice. How do I get the framework into my project?
I did all of the steps in the documentation, but it did nothing but error out.
Warning: require_once(/Applications/XAMPP/xamppfiles/htdocs/fundraising/reports/libraries/import.legacy.php) [function.require-once]: failed to open stream: No such file or directory in /Applications/XAMPP/xamppfiles/htdocs/fundraising/reports/reports.php on line 25
Fatal error: require_once() [function.require]: Failed opening required '/Applications/XAMPP/xamppfiles/htdocs/fundraising/reports/libraries/import.legacy.php' (include_path='.:/Applications/XAMPP/xamppfiles/lib/php:/Applications/XAMPP/xamppfiles/lib/php/pear') in /Applications/XAMPP/xamppfiles/htdocs/fundraising/reports/reports.php on line 25
Above are the 2 errors I got.
I am not finding the files I need in any of the downloads. Has anyone else been able to succesfully install and use the framework?
Thanks
I had the same problem trying to do the "hello world" examples from http://docs.joomla.org/Framework:Creating_a_Stand-alone_Application . To solve it I copied the whole library from a Joomla instalation in the main directory and worked fine.
But this fix is not the right solution since the aim of the framework is to be independent from the CMS library. In fact, there are some other example of Joomla framework Apps, that work without the libraries. https://github.com/mbabker/framework-app
One more thing: I had to add a line require_once JPATH_LIBRARIES . '/cms.php'; in oder to avoid a problem with the class JRegistry, that was doesn't exist anymore in J3.3 https://github.com/joomla/joomla-cms/pull/3374 .`

Resources