laravel-5.3

How to solve Missing argument 3 for Rinvex\Repository\Repositories\BaseRepository::join()?

醉酒当歌 提交于 2019-12-12 05:37:52
问题 I use this : https://github.com/rinvex/repository My query is like this : $query = $this->store_repository ->join('favorites', function ($join) { $join->on('stores.id', '=', 'favorites.favoritable_id') ->where('favorites.favoritable_type', 'like', 'App\\\Models\\\Store'); }) ->where('stores.status', '=', 1) ->select('stores.id', 'stores.name', 'stores.photo','stores.address'); if($location) $query->where('stores.address', 'like', "%$location%"); if($q) { $query->where('stores.name', 'like', "

\Auth::user() is null in 5.3.6?

亡梦爱人 提交于 2019-12-12 04:58:47
问题 This is about Laravel 5.3.6 I am able to login successfully and I can check Auth User after login. I can show the exact location where Auth::guard() has current user object. Below are the details. Go to Login Controller Go to AuthenticatesUsers Trait Go to sendLoginResponse method. User reaches here successfully because user is authenticated successfully. here I can check $this->guard()->user() has current user value. But when control reaches to Role controller....I tried to access it like

How to use laravel pagination with query builder

不羁岁月 提交于 2019-12-12 04:46:32
问题 I am using laravel pagination but it is not working with query builder i have also refer the every answer of below stack url but it is also not working every answer showing a new error.Please help me to resolve this problem how i can used pagination with laravel query builder.I am using 5.3 version of laravel. Stack referal link=Laravel 5 Pagination with Query Builder public function ajaxPagination(Request $request) { $query="SELECT users.`id`,users.`email`,users.`u_firstname`,users.`u

How to resolve : ReflectionException in Route.php line 333: Method App\Http\Controllers\PerekamanController::show() does not exist" in Laravel 5.3?

放肆的年华 提交于 2019-12-12 04:27:15
问题 My proses.blade.php is like this : <form method="POST" action="{{ url('/perekamans/proses') }}"> {!! csrf_field() !!} ... </form> My routes\web.php is like this : Route::resource('perekamans', 'PerekamanController'); Route::get('perekamans/proses', ['uses' => 'PerekamanController@listdata']); My PerekamanController is like this : <?php namespace App\Http\Controllers; use Illuminate\Http\Request; class PerekamanController extends Controller { public function index(Request $request) { return

Laravel: The file was not uploaded due to an unknown error

混江龙づ霸主 提交于 2019-12-12 04:17:37
问题 I am trying to upload a file to two different locations. The lcoations being /2x/ adn /3x/ . It uploads the file on 3x but doesn't on 2x and throws this error: The file was not uploaded due to an unknown error Here is what i am doing: $photo = $request->file('photo'); if (isset($photo)) { if ($photo != null || $photo != '') { $imageSize = getimagesize($photo); $resolution = $imageSize[0] . 'x' . $imageSize[1]; if ($resolution == '300x300' || $resolution == '450x450') { if (!file_exists(base

cURL error 60: SSL certificate in Laravel 5.3

我们两清 提交于 2019-12-12 03:57:10
问题 I'm trying to build a social media package socialite version ^2.0 login in Laravel 5.3 , where I've configured as per the instruction on github, while getting the callback I'm getting an error: cURL error 60: SSL certificate problem Well I tried searching about this problem and whatever it was instructed I did, but still getting the same certificate error. First of all I'm using wamp server which has PHP version 5.6 and 7 I saved the cacert.pem from the link https://curl.haxx.se/ca/cacert.pem

Route::controllers in Laravel 5.3

依然范特西╮ 提交于 2019-12-12 03:53:34
问题 [BadMethodCallException] Method controllers does not exist. Route::controllers(['auth' => 'Auth\AuthController', 'password' => 'Auth\PasswordController',]); How is in Laravel 5.3? Thanks 回答1: The Route::controller() has been deprecated (notes can be seen in the upgrade from 5.2 -> 5.3 on the docs site) Implicit controller routes using Route::controller have been deprecated. Please use explicit route registration in your routes file. This will likely be extracted into a package. Instead you

Laravel Dynamic Database's

僤鯓⒐⒋嵵緔 提交于 2019-12-12 03:52:45
问题 (Laravel Config::set Persist Through Requests?) After getting the answer below, I tried it out... 'default' => 'mysql_main', 'connections' => [ 'mysql_main' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', 'localhost'), 'port' => env('DB_PORT', '3306'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, 'engine' => null, ], 'mysql

Why pagination links returns json when clicked? (Vue.js 2)

為{幸葍}努か 提交于 2019-12-12 03:43:59
问题 I have 2 component Component 1, The name is SearchResultVue.vue component The component is like this : <template> ... <span class="pull-right" v-show="totalall>8"> <pagination :data="list" :total="totalPage" :nextPage="nextPage" :prevPage="prevPage"></pagination> </span> ... </template> The component call component 2. The name is Pagination.vue component The Pagination component is like this : <template> <nav aria-label="Page navigation"> <ul class="pagination"> <li> <a :href="prevPage" aria

Laravel orderBy date is not working when using paginator

ε祈祈猫儿з 提交于 2019-12-12 03:43:42
问题 I am new to laravel and am struggling to figure this one out.I am trying to order my posts by date and also use the paginator. Whenever I remove the paginator. it orders by date, but adding it back in orders by id, I think? My model class Post extends Model { // protected $dates = ['date']; } My controller method public function show() { $posts = Post::orderBy('date','desc')->get(); return view('welcome',['posts' => Post::paginate(5)], compact('posts')); } 回答1: You're essentially retrieving