laravel-5.2

Call to undefined method Illuminate\Support\Facades\Validator::resolver()

眉间皱痕 提交于 2019-12-13 11:12:21
问题 What is it about ? I am using Laravel 5.2 and update the composer by running the following command composer require felixkiss/uniquewith-validator:2.* and then added the following to your providers array in config/app.php: 'providers' => array( // ... 'Felixkiss\UniqueWithValidator\UniqueWithValidatorServiceProvider', ), I did this because I am trying to implement Multiple column Unique Validation. I mean Composite Key Validation. I am following the instructions as mentioned here What's the

Updating Larael from 5.1.35 to 5.2.* - fails to upgrade symfony/css-selector

别说谁变了你拦得住时间么 提交于 2019-12-13 08:36:32
问题 I am trying to upgrade Laravel 5.1.35 to Laravel 5.2 and I am getting the following error: Problem 1 - laravel/framework v5.1.35 requires symfony/css-selector 2.7.* -> satisfiable by symfony/css-selector[2.7.x-dev, v2.7.0, v2.7.0-BETA1, v2.7.0-BETA2, v2.7.1, v2.7.10, v2.7.11, v2.7.12, v2.7.13, v2.7.14, v2.7.15, v2.7.16, v2.7.2, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.7.9] but these conflict with your requirements or minimum-stability. - Conclusion: don't install laravel/framework

How do I fetch name of locale (language) not just a locale string, but rather the name of that language in LARAVEL?

和自甴很熟 提交于 2019-12-13 08:27:27
问题 How do I fetch name of locale (language) not just a locale string, but rather the name of that language in LARAVEL? {{ app()->getLocale() }} 回答1: Laravel doesn't have this information. You need to add it manually by creating table or config with locales and their languages names. 回答2: I resolved this by adding an entry to a translation file using Laravel Localization. https://laravel.com/docs/5.7/localization In AppServiceProvider@boot : $language = Settings::get('language'); // Fetch saved

Issue with Laravel 5.2 and His non-persistent App SetLocale over http://

痞子三分冷 提交于 2019-12-13 08:09:46
问题 Can anyone point me in the right direction when trying to troubleshoot this web app (Dorothea Special School) I created a few years back using this link Laravel 5 And His F*cking non-persistent App SetLocale If I can recall it was working perfectly when I 1st published the web app, but for a while now it doesn't seem to be working correctly... I think I did check the log file on the server and a couple more things to no avail. Do you think I need to run a composer cmd on the server? 回答1: You

Laravel 5.2 Create object FatalErrorException in AliasLoader.php line 63

那年仲夏 提交于 2019-12-13 07:17:21
问题 I'm using spatie/laravel-permission for roles and permissions. I'm trying to create an interface for adding permissions. PermissionController <?php namespace App\Http\Controllers; use Spatie\Permission\Models\Permission; use Illuminate\Http\Request; use App\Http\Requests; class PermissionController extends Controller { public function index() { $permissions = Permission::all(); return view('permissions.index', compact('permissions')); } public function create() { return view('permissions

Laravel 5 Auth:attempt() always returns false

a 夏天 提交于 2019-12-13 06:41:15
问题 I am trying to make a custom login with multi auth. For the meantime, I am trying to do the login for admin. When an admin logs in, the login function handles it (it also just refreshes without the login function) Auth:attempt() seems to be always returning false, however (I have a different table name and fields). Aside from that, I can freely access the dashboard by just changing the url even if the user is not really logged in. AuthController /* |-------------------------------------------

Array returning null value, many to many. laravel

孤者浪人 提交于 2019-12-13 06:14:42
问题 I'm trying to retrieve data from many to many relationship.I have two tables : companies: [cid,name,origin] vehicle_types: [id, type] their pivot table: companies_vehicle_types: companies_id,vehicle_types_id Relationship defined: In Companies: class companies extends Model { // protected $fillable = ['name','origin']; protected $primaryKey = 'cid'; public function vehicles(){ return $this->hasOne('App\vehicles'); } public function vehicle_types(){ return $this->belongsToMany('App\vehicle

Alter Laravel's default log in method?

懵懂的女人 提交于 2019-12-13 05:48:42
问题 I generated authentication controllers and routes using the php artisan make:auth command. I would like to update a field named last_login in my database whenever a user logs in. 回答1: I've altered the default Auth to provide the ability to convert users' passwords from an old algorithm to bcrypt (i'm refactoring a legacy app). The way I did it: in app\Providers\EventServiceProvider.php : 'Illuminate\Auth\Events\Login' => [ 'App\Listeners\LogAuth', ], i then added the app\Listeners\LogAuth.php

Api have decode data but not work in form [duplicate]

本秂侑毒 提交于 2019-12-13 03:49:08
问题 This question already has answers here : without select category not show subcategory (2 answers) Closed 11 months ago . This is my create.blade.php file which include ajax function API and HTML tag code.. @extends('layouts.app') @section('content') <link rel="stylesheet" href="http://www.codermen.com/css/bootstrap.min.css"> <script src="http://www.codermen.com/js/jquery.js"></script> <form enctype="multipart/form-data" method="post" action="{{route('post.store')}}" > @csrf <div class="form

Get data from database with condition and show it in a view

吃可爱长大的小学妹 提交于 2019-12-13 03:48:17
问题 This is the data that I have in database This is what I want to make in the view.blade.php What I want to do is I want to get the data from the database, if the data inside the column is 1, I want to get the column name as you can see in image 2, but there could be more than 1 column name because the column with data can be column A,B,C... etc.. and I want to show the student name and the subject (a,b,c... etc) if the data in it is '1' in the view. I stuck on how to get all those subject A,B