0 Best Reply Awards

  • Member Since 1 Month Ago
  • 0 Lessons Completed
  • 0 Favorites

19th September, 2017

Kazuto left a reply on Vue Not Getting Array Values • 2 days ago

@topvillas I'm using buefy. If that's what you mean.

Kazuto left a reply on Vue Not Getting Array Values • 2 days ago

@topvillas <input type="hidden" name="players" v-model="playerSelected"> isn't working either.

Kazuto started a new conversation Vue Not Getting Array Values • 2 days ago

If I select a checkbox vue does not give any values to the array, even though the items have a value as I checked the DOM Tree.

<div class="column">
                    <div class="card">
                        <div class="card-content">
                            <label for="players" class="label">{{ trans_choice('sites.players', 2) }}</label>
                            <input type="hidden" name="players" :value="playerSelected">

                            <b-checkbox-group v-model="playerSelected">
                                @foreach ( $players as $player )
                                    <div class="field">
                                        <b-checkbox :custom-value="{{ $player->id }}">{{ $player->nickname }}</b-checkbox>

        var app = new Vue({
            el: '#app',
            data: {
                playerSelected: {!! $team->players->pluck('id') !!},
                gameSelected: {!! $team->games->pluck('id') !!}

18th September, 2017

Kazuto left a reply on Undefinded Index After Renaming/refactoring • 3 days ago

@Snapey Yes, unfortunately. But I've managed to revert my changes. Glad that PhpStorm has a local history so I just reverted everything back to what is was yesterday evening when I stopped my session and did my latest commit.

It works now again. Should have tried the history before posting this but maybe this will help some others at some point.

Kazuto started a new conversation Undefinded Index After Renaming/refactoring • 3 days ago

Hey guys,

I wanted to create two subfolders for my controllers. One called manage and one called public. I've noticed that Controllers\public won't work in the namespace so I've renamed/refactored it to frontend.

Now I can't use Storage::put anymore even though filesystems.php is back to normal.

This is the error I'm getting:

at HandleExceptions->handleError(8, 'Undefined index: frontend', '/Users/hillemacher/Desktop/git/turtle-esports-cms/vendor/league/flysystem/src/Adapter/Local.php', 349, array('path' => 'images/posts/1505757886.jpg', 'visibility' => 'frontend', 'location' => '/Users/hillemacher/Desktop/git/turtle-esports-cms/storage/app/frontend/images/posts/1505757886.jpg', 'type' => 'file'))
in Local.php (line 349)

I've already checked flysystem/src/Adapter/Local.php but there are no occurences of "frontend" whatsoever.

17th September, 2017

Kazuto started a new conversation Save And Display Two Relations • 4 days ago

Hey guys,

I'm close to finish my CMS but I have one minor problem.

I can create several teams, works perfectly fine. I can create several games, works also perfectly fine.

Now I want to create matches between those teams, which means I have two pivot tables. One called game_match and the other called match_team.

game_match consist of game_idand match_id match_teamconsist of match_id, team1_idand team2_id

My match/create.blade.php has two dropdown fields for each team.

Saving a single relation to the database works fine for me as I've done this a couple of times, but I can't figure out how to save two relations.

This is what I got so far:

Inside match/create.blade.php

<div class="field m-t-20 is-inline-block">
    <p class="control">
        <label for="home" class="label"><b>{{ trans_choice('messages.home', 1) }}</b></label>
        <input type="hidden" name="home" id="home" :value="homeSelected">
        <div class="select">
            <select v-model="homeSelected">
                @foreach($teams as $team)
                    <option value="{{ $team->id }}">{{ $team->name }}</option>

<div class="field m-t-20 is-inline-block">
    <p class="control">
        <label for="opponent" class="label"><b>{{ trans_choice('messages.opponent', 1) }}</b></label>
        <input type="hidden" name="opponent" id="opponent" :value="opponentSelected">
        <div class="select">
            <select v-model="opponentSelected">
                @foreach($teams as $team)
                    <option value="{{ $team->id }}">{{ $team->name }}</option>

        var app = new Vue({
            el: '#app',
            data: {
                homeSelected: "",
                opponentSelected: "",
                gameSelected: ""


public function store(Request $request)
        $this->validate($request, [
            'title' => 'required|max:255',
            'matchday' => 'required',

        $match = new Match();

        $match->title = $request->title;
        $match->matchday = $request->matchday;

        if ($match->save()) {
            $match->teams()->sync( [
                ['team1_id' => $request->home, 'team2_id' => $request->opponent],

            Session::flash('success', trans('messages.created', ['item' => $match->title]));
            return redirect()->route('matches.show', $match->id);
        } else {
            Session::flash('error', trans('messages.error'));
            return redirect()->route('matches.create')->withInput();



namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Match extends Model
    use SoftDeletes; // <-- Use This Instead Of SoftDeletingTrait

    protected $fillable = [

    protected $dates = ['deleted_at'];

    public function setHomeTeam () {}

    public function teams () {
        return $this->belongsToMany('App\Team', 'match_team', 'match_id', 'team1_id');

    public function games () {
        return $this->belongsToMany('App\Game', 'game_match');

    public function getHomeTeam() {
        return $this->belongsToMany('App\Team', 'match_team', 'match_id', 'team1_id');

    public function getOpponentTeam() {
        return $this->belongsToMany('App\Team', 'match_team', 'match_id', 'team2_id');

Can someone help me?

16th September, 2017

Kazuto left a reply on Nginx | Can Only Access Some Routes But Not All • 5 days ago

I should have look in the logs sooner.

I've forgot that I've added soft deletes locally but have not migrated them to the production server.

Now everything works fine.

Thanks @Snapey

Kazuto left a reply on Nginx | Can Only Access Some Routes But Not All • 5 days ago

@Snapey error_log shows no entries. I just get the regular "Whoops. Something went wrong."

access_log shows this:

XX.XX.XX.XX - - [16/Sep/2017:11:03:02 +0200] "GET /manage/members HTTP/1.1" 500 20837 "http://turtles.devel.kazuto.de/manage/dashboard" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36"
XX.XX.XX.XX- - [16/Sep/2017:11:03:02 +0200] "GET /favicon.ico HTTP/1.1" 200 0 "http://turtles.devel.kazuto.de/manage/members" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36"

@Cronix I've changed the order of the routes and put every ::resource to the end. But nothing has changed.

15th September, 2017

Kazuto left a reply on Nginx | Can Only Access Some Routes But Not All • 6 days ago

Server OS: Ubuntu 16.04 | PHP 7.0 | nginx: 1.10.3 Local OS: OSX 10.12.1 | PHP 7.1.4

Laravel: 5.4.32



| Web Routes
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!

Route::get('/', function () {
    return view('welcome');


Route::prefix('manage')->middleware('role:superadministrator|administrator|editor|author|contributor')->group(function () {
    Route::get('/', 'ManageController@index');
    Route::get('/dashboard', 'ManageController@dashboard')->name('manage.dashboard');

    /* General */
    Route::resource('/posts', 'PostController');
    Route::post('/posts/{post}/restore', 'PostController@restore')->name('posts.restore');
    Route::delete('/posts/{post}/delete', 'PostController@delete')->name('posts.delete');

    Route::resource('/downloads', 'DownloadController');
    Route::post('/downloads/{download}/restore', 'DownloadController@restore')->name('downloads.restore');
    Route::delete('/downloads/{download}/delete', 'DownloadController@delete')->name('downloads.delete');

    Route::resource('/streams', 'StreamController');
    Route::post('/streams/{stream}/restore', 'StreamController@restore')->name('streams.restore');
    Route::delete('/streams/{stream}/delete', 'StreamController@delete')->name('streams.delete');

    Route::resource('/providers', 'ProviderController');
    Route::post('/providers/{provider}/restore', 'ProviderController@restore')->name('providers.restore');
    Route::delete('/providers/{provider}/delete', 'ProviderController@delete')->name('providers.delete');

    /* eSport */
    Route::resource('/teams', 'TeamController');
    Route::post('/teams/{team}/restore', 'TeamController@restore')->name('teams.restore');
    Route::delete('/teams/{team}/delete', 'TeamController@delete')->name('teams.delete');

    Route::resource('/members', 'MemberController');
    Route::post('/members/{member}/restore', 'MemberController@restore')->name('members.restore');
    Route::delete('/members/{member}/delete', 'MemberController@delete')->name('members.delete');

    Route::resource('/awards', 'AwardController');
    Route::post('/awards/{award}/restore', 'AwardController@restore')->name('awards.restore');
    Route::delete('/awards/{award}/delete', 'AwardController@delete')->name('awards.delete');

    Route::resource('/matches', 'MatchController');
    Route::post('/matches/{match}/restore', 'MatchController@restore')->name('matches.restore');
    Route::delete('/matches/{match}/delete', 'MatchController@delete')->name('matches.delete');

    Route::resource('/games', 'GameController');
    Route::post('/games/{game}/restore', 'GameController@restore')->name('games.restore');
    Route::delete('/games/{game}/delete', 'GameController@delete')->name('games.delete');

    Route::resource('/sponsors', 'SponsorController');
    Route::post('/sponsors/{sponsor}/restore', 'SponsorController@restore')->name('sponsors.restore');
    Route::delete('/sponsors/{sponsor}/delete', 'SponsorController@delete')->name('sponsors.delete');

    Route::resource('/users', 'UserController');
    Route::resource('/permissions', 'PermissionController');
    Route::resource('/roles', 'RoleController');
    Route::resource('/menus', 'MenuController');

Route::get('/home', 'HomeController@index')->name('home');

14th September, 2017

Kazuto started a new conversation Nginx | Can Only Access Some Routes But Not All • 1 week ago

Hey guys,

I can access routes like "manage/users" or "manage/roles" but not "manage/downloads". Locally everything works just fine, so it has to so something with my server.

        listen 80;
    listen [::]:80;

    # Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
    return 301 https://$host$request_uri;

        server_name server_name MYDOMAIN;

server {
        listen 443 ssl http2;
        listen [::]:443 ssl http2;


        root /var/www/path/to/my/project/public;

        index index.php index.html index.htm;

        server_name MYDOMAIN;

        location / {
                try_files $uri $uri/ /index.php$is_args$args;

        location ~ \.php$ {
                try_files $uri /index.php =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/run/php/php7.0-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;

        location ~ /\.ht {
                deny all;

        location ~ /.well-known {
                allow all;

18th August, 2017

Kazuto left a reply on How Do Retrieve Data Of A Specified Many-to-many Column? • 1 month ago

I already have relationships and they're working fine. I just don't know how to display the informations of "team1_id" and "team2_id" separately.

Kazuto started a new conversation How Do Retrieve Data Of A Specified Many-to-many Column? • 1 month ago

I'm having an intermediate table with "match_id", "team1_id" and "team2_id" and I want to display the related informations separately.

How do I need to approach this?

8th August, 2017

Kazuto started a new conversation Can't Figure Out Sync(). • 1 month ago

Hey guys,

I'm fairly new to Laravel and Blade, startet a few weeks ago. Currently I'm working on a CMS for a friend/customer.

What I plan on doing: Create Teams > Create Members >Edit Team and attach members.

I've created three tables for this: teams, members and team_member.

The team_member table consists of:

Schema::create('team_member', function (Blueprint $table) {


            $table->primary(['team_id', 'member_id', 'team_type']);

and I have a hidden input named "member".

Edit Your Profile

Want to change your profile photo? We pull from gravatar.com.