{{ route('cart.store') }}
laroute.route('cart.store')
<?php
namespace App;
use App\CustomCollection;
use Illuminate\Database\Eloquent\Model;
class User extends Model
{
/**
* Create a new Eloquent Collection instance.
*
* @param array $models
* @return \Illuminate\Database\Eloquent\Collection
*/
public function newCollection(array $models = [])
{
return new CustomCollection($models);
}
}
ssh root@example.com 'cd /var/www/<project>/laradock; docker-compose run postgres pg_dump -Fc --dbname=postgresql://<user>:<password>@postgres:5432/<database> > /var/www/dump.sql'
scp root@example.com:/var/www/dump.sql .
docker cp dump.sql <container_name>:/tmp/
docker-compose exec postgres dropdb default -U default
docker-compose exec postgres psql -U <username> -W -qAt -c 'CREATE DATABASE "default"'
docker-compose exec postgres psql -U <username> -W -qAt -c 'grant all privileges on database "default" to "default"';
docker-compose exec postgres pg_restore -U default --no-owner --role=default -d default -c /tmp/dump.sql
$setting = Setting::whereKey('title')->first(); // выбираем какую то настройку из базы
$setting->value = 'Магазин по продаже носков'; // устанавливаем значение
$setting->save(); // сохраняем в БД
$e->getMessage();
echo $e->getMessage();
$img = Image::make(public_path() . $uploadedFilePath);
try {
$img->orientate();
} catch (NotSupportedException $e) {
// Если не можем повернуть фотку, то просто пропустим ошибку, ничего не делаем
// return response()->json('Не могу повернуть фотографию', 500);
}
[mongodb-org-3.2]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.2.asc
yum -y install http php mongodb-org
yum -y install gcc php-pear php-devel openssl-devel.i686 libxml2-devel openssl-devel
extension=mongo.so