laravel-5.3

How can I update value in input type text on vue.js 2?

我的未来我决定 提交于 2019-12-11 13:46:32
问题 My view blade laravel like this : <form slot="search" class="navbar-search" action="{{url('search')}}"> <search-header-view></search-header-view> </form> The view blade laravel call vue component (search-header-view component) My vue component(search-header-view component) like this : <template> <div class="form-group"> <div class="input-group"> <input type="text" class="form-control" placeholder="Search" name="q" autofocus v-model="keyword" :value="keyword"> <span class="input-group-btn">

How can I get value in datetimepicker bootstrap on vue component?

╄→尐↘猪︶ㄣ 提交于 2019-12-11 08:48:33
问题 My view blade, you can see this below : ... <div class="panel-body"> <order-view v-cloak> <input slot="from-date" data-date-format="DD-MM-YYYY" title="DD-MM-YYYY" type="text" class="form-control" placeholder="Date" name="from_date" id="datetimepicker" required> <input slot="to-date" data-date-format="DD-MM-YYYY" title="DD-MM-YYYY" type="text" class="form-control" placeholder="Date" name="to_date" id="datetimepicker" required> </order-view> </div> ... My order-view component, you can see this

Register new type of user in Laravel 5.3

馋奶兔 提交于 2019-12-11 08:42:17
问题 I'm trying to make two types of users in laravel and I have two tables for that. I want to use defined register view and controller from laravel, but when I register new users it saved only in the first table. The problem is with this url('/register') from here <form class="form-horizontal" role="form" method="POST" action="{{ url('/register') }}" id="form_reg1"> which I don't know how to edit this url for sending post request, because I'm using two forms, one for the first type of user, and

Server composer install --no-dev killed

醉酒当歌 提交于 2019-12-11 08:39:11
问题 In server when I try update packages composer install --no-dev Result is How can I fix it? 回答1: It looks like composer install is trying to update packages, so you probably does not have composer.lock file in your project. In that case composer install works like composer update which requires a lot of memory. Your server probably does not have enough memory and process gets killed by OS. The easiest way of solving this would be to generate composer.lock on dev environment, commit it into

Laravel external URL issue

杀马特。学长 韩版系。学妹 提交于 2019-12-11 08:24:25
问题 I want to set external URL in some of my anchor tags but facing problem when URL is without http/https protocol. When URL is without these protocols URL become like following: <a target="_blank" href="www.usatoday.com/"></a> when I click on it or hover over it, it shows and redirect me to: http://localhost/event/www.usatoday.com I've tried following two ways in href but didn't worked: {{url($eventSponsorsRow->sponsorUrl)}} {{ $eventSponsorsRow->sponsorUrl }} instead of URL in href. Laravel 5

$request->session didn't work in Laravel 5.3 resource controller

让人想犯罪 __ 提交于 2019-12-11 08:18:04
问题 First of all, I already check that in other controller (not in resource controller) my session work very well, but when I did it in the resource controller my code for get session didn't work. Here's my resource controller <?php namespace App\Http\Controllers\Admin; use Illuminate\Http\Request; use App\Http\Controllers\Controller; //tambahan use DB; use Session; //model use App\_admins; use App\Mahasiswas; class MahasiswaController extends Controller { protected $data; protected $token;

Get Images via relationship

情到浓时终转凉″ 提交于 2019-12-11 08:04:05
问题 From the charts , I want to get each images which trade_id via relationship. For example, if trade_id is 62, from the charts table, get all images which has 62 in trade_id . charts table structure: Trade model: public function chart() { return $this->hasMany('App\Chart'); } @if($trades) <tbody> @foreach($trades as $trade) <tr> <td> <img src="{{$trade->chart->file }}" style="width:32px; height:32px; position:absolute; top:10px; left:10px; border-radius:50%"> </td> </tr> @endforeach </tbody>

laravel : count(): Parameter must be an array or an object that implements Countable

余生长醉 提交于 2019-12-11 07:45:26
问题 I'm using Laravel 5.3 and my php ver is 7.1 when i called SoftDeletes class i get that error ErrorException in Builder.php line 1231: count(): Parameter must be an array or an object that implements Countable this is my model <?php namespace App; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; class Post extends Model { use SoftDeletes; protected $dates = ['deleted_at']; protected $fillable = [ 'title','content','image','category_id','slug' ]; public

Lumen 5.3 Authentication

狂风中的少年 提交于 2019-12-11 07:26:43
问题 I have installed Lumen and trying to implement authentication. I am using Laravel Framework version Lumen (5.3.3) (Laravel Components 5.3.*). In app.php I have uncommented the following. $app->withFacades(); $app->routeMiddleware([ 'auth' => App\Http\Middleware\Authenticate::class, ]); $app->register(App\Providers\AuthServiceProvider::class); In \app\Providers\AuthServiceProvider.php public function boot() { $this->app['auth']->viaRequest('api', function ($request) { if ($request->input('api

Auth::login($user) in laravel not able to login the user

♀尐吖头ヾ 提交于 2019-12-11 07:17:29
问题 I am using laravel 5.4 and Auth::login($user) is showing Type error: Argument 1 passed to Illuminate\Auth\SessionGuard::login() must implement interface Illuminate\Contracts\Auth\Authenticatable, instance of Illuminate\Database\Eloquent\Builder given, called in /home/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php on line 294 My User.php file is: namespace App; use Illuminate\Notifications\Notifiable; use Illuminate\Foundation\Auth\User as Authenticatable; class User extends