laravel-5.2

query that worked in Laravel 5.2 give me error in Laravel 5.3

℡╲_俬逩灬. 提交于 2019-12-10 03:48:56
问题 This query works in 5.2: $galleries = Gallery::with(array( 'images' => function ($query) { $query->orderBy('order', 'asc'); } )) ->with('votes') ->leftJoin('votes', 'votes.votable_id', '=', 'gallery.id') ->selectRaw( 'gallery.*, count(case votes.status when "upvote" then 1 else null end) - count(case votes.status when "downvote" then 1 else null end) as points' ) ->where('votes.votable_type','App\Gallery') ->groupBy('gallery.id') ->orderBy('points', 'desc') ->published()->orderBy('gallery

URL Blocked: This redirect failed because the redirect URI is not whitelisted…(Localhost web application)

孤街浪徒 提交于 2019-12-10 01:23:51
问题 URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings. Make sure Client and Web OAuth Login are on and add all your app domains as Valid OAuth Redirect URIs. I've installed the laravel/socialite and I'm trying to link my application with facebook ! after installing the package ,creating my facebook application , I try to acces to the login page with facebook on my application but it keeps telling me that ther's some kind of URL errors

Call to undefined method Illuminate\Database\Query\Builder::notify()

二次信任 提交于 2019-12-10 00:40:24
问题 Issue in Laravel 5.3.6 when submitted request in Forgot Password. Error Details Call to undefined method Illuminate\Database\Query\Builder::notify() Issue is in below file: vendor\laravel\framework\src\Illuminate\Auth\Passwords\PasswordBroker.php Line 69. Code is below $user->sendPasswordResetNotification( $this->tokens->create($user) ); Function: sendResetLink It was working fine in Laravel 5.2 and seems not working in 5.3.6 version. Have you faced this issue? 回答1: You must add Illuminate

Laravel 5.2 - Auth: display custom error messages

倾然丶 夕夏残阳落幕 提交于 2019-12-09 15:36:38
问题 How can I customize the error messages (such as "These credentials do not match our records." ) that are displayed upon unsuccessful login/registration without having to touch the foundation files? I'm looking for a solution and hopefully an elegant one, at least not touching AuthenticatesAndRegistersUsers nor ThrottlesLogins :) I'm using the AuthController and forms provided by Laravel after executing: php artisan make:auth Controller: (it only has a constructor and two methods, the rest

Laravel 5.2 Session values not persisting even when web middleware is used

耗尽温柔 提交于 2019-12-09 14:42:58
问题 I've got a Laravel 5.2 project that I'm using as a mock API for a javascript client I'm building out. The mock API functionality will be replaced with a different Laravel project later. For now, I just need to be able to submit API calls and get expected responses. In my mock API I'm storing the authentication status in the session. The problem I'm running into is that the values I put into the session are not persisting between http calls. This seemed similar to a different stackoverflow

Laravel 5.2 : csrf token doesn't work

寵の児 提交于 2019-12-09 11:22:31
问题 Hi Why my csrf token value is null ? And when i don't use token i havent TokenMismatchException!!!! how can i fix it ? I dug deeper and found that a session is not being registered in SessionServiceProvider. Is there something that needs to be enabled for this to work by default? Since I am a Laravel beginner, I am not sure how to follow the advice above. How do I make sure that my routes are added under the "web" group? <form method="post" action="<?php echo url('/form'); ?>"> <input type=

Vue.js interceptor

放肆的年华 提交于 2019-12-09 10:48:04
问题 How can I use a interceptor in vue.js ? So before every request/response it should first go to the interceptor. I already searched a lot but can't find a good documentation about that. I would like to use JWTAuth like this: (function (define) { 'use strict' define(function (require) { var interceptor interceptor = require('rest/interceptor') /** * Authenticates the request using JWT Authentication * * @param {Client} [client] client to wrap * @param {Object} config * * @returns {Client} */

Auth::user() doesn't travel across subdomains? - Laravel 5.2

柔情痞子 提交于 2019-12-09 06:50:54
问题 I have a subdomain in my site, for example: http://example.ca http://blog.example.ca The blog one is only accessible to people who have the url, that is, its not public or common knowledge. I have a bunch of routes related to this domain that requires you to be logged in. I have stated in a nav.blade.php that if the user is logged in, there should be a drop down and if not then there should not be a drop down. this all works for http://blog.example.ca but when I go to http://example.ca I am

bootstrap styling doesn't work in some views in Laravel 5.2

我只是一个虾纸丫 提交于 2019-12-08 21:13:28
I'm begginer in Laravel 5.2, I make a simple personal blog and here's views folder in home.blade.php I extends 'layouts.master' which uses bootstrap and works great. now I made a new route to show specific blog: Route::group(['prefix'=>'post'], function(){ Route::get('{id}', function(){ return view('blog'); }); }); when I go to http://localhost:8000/post/1 it works great but the problem when I extend layouts.master bootstrap and my custom css doesn't work ! it works in home.blade.php and works in pages/about.blade.php correctly but when I try to make any new route to a view and extend layouts

No gulpfile found

本秂侑毒 提交于 2019-12-08 16:57:01
问题 I am new in laravel. I am trying the command nmp install. it does not work. Then as shown in their official documentation, I tried npm install --global gulp-cli but I was getting access denied error. So I gave sudo npm install --global gulp-cli It seemed to give me some correct result. then I gave npm install --no-bin-links but it says that, "npm WARN vagrant@1.0.0 No description npm WARN vagrant@1.0.0 No repository field." I tried npm install -d though the result ended with "ok" (after