laravel-5.3

The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. laravel 5.3

南楼画角 提交于 2019-12-17 10:33:07
问题 I installed a new fresh copy of laravel 5.3 using composer but I keep getting this error: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. Even though my app.php file in config directory specify 'cipher' => 'AES-128-CBC', 回答1: You need to have .env on your appication folder then run: $ php artisan key:generate If you don't have .env copy from .env.example : $ cp .env.example .env 回答2: Run this commands on your terminal: php artisan config:clear then php

Laravel's 5.3 passport and api routes

我与影子孤独终老i 提交于 2019-12-17 08:51:47
问题 I'm using Laravel Framework version 5.3.9, fresh download nothing added on via composer(except "laravel/passport": "^1.0" ). I did all the things suggested in the docs. Tables are created, routes are up, everything works fine. However I need passport for an API. My routes look like so: +--------+----------+-----------------------------------------+----------------------+----------------------------------------------------------------------------+------------+ | Domain | Method | URI | Name |

Laravel's 5.3 passport and api routes

我怕爱的太早我们不能终老 提交于 2019-12-17 08:51:16
问题 I'm using Laravel Framework version 5.3.9, fresh download nothing added on via composer(except "laravel/passport": "^1.0" ). I did all the things suggested in the docs. Tables are created, routes are up, everything works fine. However I need passport for an API. My routes look like so: +--------+----------+-----------------------------------------+----------------------+----------------------------------------------------------------------------+------------+ | Domain | Method | URI | Name |

Illegal offset type - Laravel 5.3 - ConnectionFactory.php - Every Model

那年仲夏 提交于 2019-12-14 03:54:37
问题 First sorry for bad english, not native. I'v an Laravel 5.3 App running on XAMPP, windows 7 machine. Everything was working great, and i don't have made any impact changes on code, it just happened. Everytime my app trys to build the connection with mysql this error is shown: FatalThrowableError in ConnectionFactory.php line 237: Illegal offset type in ConnectionFactory.php line 237 ConnectionFactory->createConnector(array('driver' => 'mysql', 'host' => '127.0.0.1', 'port' => '3306',

Method 'create' not found in class Illuminate\Support\Facades\Schema

南笙酒味 提交于 2019-12-14 01:06:19
问题 I'm using Laravel 5.3, in PhpStorm there is error under the method 'create' and many other methods. I tried all the ide_helpers but nothing resolved it is there anyway to resolve this and the autocomplete? 回答1: I found the answer the problem was with the use lines : use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; first line should be replaced with: use Schema; 来源: https://stackoverflow.com/questions/39964026/method

How to solve Call to undefined method Illuminate\Database\Query\Builder::notify()? (laravel 5.3)

牧云@^-^@ 提交于 2019-12-13 23:37:23
问题 My function create in controller is like this : public function create() { // This is dummpy data to testing checkout order event $data = array( 'number' => '2', 'user' => 'chelsea', 'store' => 'chelsea shop', 'total_amount' => 11000000, 'total_product' => 2, 'status' => '92000000', 'delivery_address' => 'london', 'email' => 'chelsea@gmail.com' ); $data = Order::where('number', $data['number'])->first(); \Event::fire(new CheckoutOrderEvent($data)); } My CheckoutOrderListener is like this : <

Laravel 5.3 admin guard not working

[亡魂溺海] 提交于 2019-12-13 17:33:10
问题 I am trying to login from two different model using same login form. I have defined admin guard in config/Auth.php. But when I define admin guard in Foundation/AuthenticateUsers it checks the database table to validate the user but redirects back to same login form. config/auth.php 'guards' => [ 'web' => [ 'driver' => 'session', 'provider' => 'users', ], 'admin' => [ 'driver' => 'session', 'provider' => 'admins', ], 'api' => [ 'driver' => 'token', 'provider' => 'users', ], ], 'providers' => [

How can I join with Eloquent: Relationships?

青春壹個敷衍的年華 提交于 2019-12-13 13:10:50
问题 My query is like this : <?php public function getListReviews() { $reviews = Review::where('user_id', auth()->user()->id) ->get(); return $reviews; } From the query, it can get all review data by id I want get user photo, store photo and product photo I want get it use Eloquent: Relationships How can I get it with Eloquent: Relationships? My review model is like this : <?php namespace App; use Jenssegers\Mongodb\Eloquent\Model as Eloquent; use Jenssegers\Mongodb\Eloquent\HybridRelations; class

laravel 5.3 upload file

安稳与你 提交于 2019-12-13 09:40:05
问题 I'm using laravel 5.3, and i want to upload a file to a directory. i've been following laravel documentation for uploading file, like this code : public function store(Request $request) { $path = $request->attachment->store('attachment'); } but it get an error Call to a member function store() on string previously on laravel 5.2, i've been use this code for uploading file and it's work if ($request->hasFile('attachment')) { $destination = 'upload/attachment'; $file = $request->file(

Writing a function in laravel

空扰寡人 提交于 2019-12-13 09:24:04
问题 I have the following function which fetch some data related to jobs from database. The user can search for jobs with job title / keyword, city and/or category. The user can either choose one option, e.g. searching jobs only by title, or by category. or he can use all options for deep search. Below is my function: public function jobsearch(Request $request) { $keyword = htmlspecialchars($request->input('keyword')); $city_id = $request->input('city_id'); $category_id = $request->input('category