laravel: how to install facebook SDK using composer - laravel-4

Friends, I am new in laravel. I don't know how to install Facebook SDK in laravel project.
Please tell me how to install the Facebook SDK in laravel project using composer.

Add:
"require" : {
"facebook/php-sdk-v4" : "3.0.*"
}
to your composer.json file.
And then run composer install

Related

Breeze for Laravel 7?

Is there a way to install Breeze (via composer) into a new Laravel v7 project?
Whenever I try composer require laravel/breeze --dev
I get failure with message:
Cannot use laravel/breeze's latest version v1.17.0 as it requires php ^8.0.2 which is not satisfied by your platform.
./composer.json has been updated
Running composer update laravel/breeze
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
I don't want to use v9 of laravel or php8 due to work on older code.
I created v7 laravel project via composer: composer create-project laravel/laravel:7.* example_app_name
Is there a similar command for previous versions of Breeze? And if so, which version would apply?
No, it should not be possible. Even version 0.0.1 requires Laravel 8.
If you upgrade to Laravel 8 (8.42 minimum version), you should be able to install breeze up to version 1.10

How to install composer globally for laravel app in windows?

I have a question related to composer and laravel. My question is whenever I install the fresh laravel app using command :
composer create-project laravel/laravel blog
Inside my C://xampp/htdocs/ directory and then change path to C://xampp/htdocs/blog/, here I am unable to run the composer command but I had already installed composer from its official website globally in C://xampp/htdocs/ directory. So is there any way to use composer command globally whenever I install fresh laravel app, so that I don't want to install composer in the laravel app directory everytime.
Now I guess they provide direct setting up global installation,
Check here
I did it like this a lot earlier,
Change to the path (or you can add that directory to your path later), and run the installer as mentioned on composer download site to download composer.phar.
Create a new composer.bat file alongside composer.phar.
Using cmd.exe:
run
echo #php "%~dp0composer.phar" %*>composer.bat
Then set it to path environment variable(see this)
Test with a new terminal:
composer -V
Will return
Composer version 1.10.6 2020-05-06 10:28:10
go to composer website and download the exe file, you should have it gloablly if you install it that way.
Good luck ^_^

Difference in files laravel install local & on server

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.

How to specify Lumen (or Laravel) version on new installation?

I want to install a specific version of Laravel Lumen (5.1 instead of the lastest one 5.2) on a new project.
From the documentation :
lumen new blog
or :
composer create-project laravel/lumen --prefer-dist
Does not work : it install the lastest one.
Create a project using the composer command :
Create a Laravel 5.1 project into the blog folder :
composer create-project laravel/laravel blog "5.1.*"
Create a Lumen 5.1 project into the blog folder :
composer create-project laravel/lumen blog "5.1.*"

Integrate Admin LTE with laravel

How to integrate/embed Admin LTE with laravel 5.2. I have found tutorials but can't get..Can anyone tell the procedure step by step. I have installed the latest laravel version which is 5.2.
At first ensure that nodejs and git is installed on your system.
After that go inside the folder where you have installed laravel
then you need to Install Bower by
npm install -g bower
Then install AdminLte by
bower install admin-lte
You can also follow the link here
https://almsaeedstudio.com/blog/integrate-adminlte-with-laravel
You can use Acacha AdminLTE Laravel package:
https://github.com/acacha/adminlte-laravel
composer global require "acacha/adminlte-laravel-installer=~3.0"
And convert any Laravel projectto AdminLTE/Pratt with:
laravel new laravel-with-admin-lte
cd laravel-with-admin-lte
adminlte-laravel install
And Enjoy! If you wish you can use llum:
llum boot
To quickly start your project in your favourite web browser!

Resources