FireFilip's avatar

Full Calendar problem in Laravel 5.2 version

The problem I have is that I can't seem to implement a code that is an example from GitHub , using the FullCalendar plugin.

There is a form that I need which is not working in 5.2 ,the piece of code is the following:

Form::open(['route' => 'events.store', 'method' => 'post', 'role' => 'form'

The problem is that routes file is changed,and I really don't know what to do.

Also,can I upload an image of the code,I can't even find that option damn.

0 likes
4 replies
Snapey's avatar

You can post code here. put three backticks ``` before and after the block of code or a single backtick ` before and after in-line code

Not sure how this is related to full calendar?

FireFilip's avatar

So this is my code ,it is a modal that adds a Calendar event,when you click it the form comes on.

But in my case it just fails

{{ Form::open(['route' => 'events.store', 'method' => 'post', 'role' => 'form']) }}
            <div id="responsive-modal" class="modal fade" tabindex="-1" data-backdrop="static">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <h4>REGISTRO DE NUEVO EVENTO</h4>
                        </div>
                        <div class="modal-body">
                            <div class="form-group">
                                {{ Form::label('title', 'TITULO DE EVENTO') }}
                                {{ Form::text('title', old('title'), ['class' => 'form-control']) }}
                            </div>

                            <div class="form-group">
                                {{ Form::label('date_start', 'FECHA INICIO') }}
                                {{ Form::text('date_start', old('date_start'), ['class' => 'form-control', 'readonly' => 'true']) }}
                            </div>

                            <div class="form-group">
                                {{ Form::label('time_start', 'HORA INICIO') }}
                                {{ Form::text('time_start', old('time_start'), ['class' => 'form-control']) }}
                            </div>

                            <div class="form-group">
                                {{ Form::label('date_end', 'FECHA HORA FIN') }}
                                {{ Form::text('date_end', old('date_end'), ['class' => 'form-control']) }}
                            </div>

                            <div class="form-group">
                                {{ Form::label('color', 'COLOR') }}
                                <div class="input-group colorpicker">
                                    {{ Form::text('color', old('color'), ['class' => 'form-control']) }}
                                    <span class="input-group-addon">
                                        <i></i>
                                    </span>
                                </div>
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-dafault" data-dismiss="modal">CANCELAR</button>
                            {!! Form::submit('GUARDAR', ['class' => 'btn btn-success']) !!}
                        </div>
                    </div>
                </div>
            </div>
            {{ Form::close() }}

This is my events Controller

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Event;

class EventsController extends Controller

public function store(Request $request)
    {
        $event = new Event();
        $event->title = $request->title;
        $event->start = $request->date_start . ' ' . $request->time_start;
        $event->end = $request->date_end;
        $event->color = $request->color;
        $event->save();

        return redirect('/');
    }

The error that Is displayed in the browser itself :

<form method="POST" action="http://localhost:8000/events" accept-charset="UTF-8" role="form"><input name="_token" type="hidden" value="n1gLPXpKQddJsMAjAzamtdqZdT60aZ2Coh6Bc9nD"> </form>

Snapey's avatar

This is like bringing home your father's wrecked car and saying 'it just crashed' .. You don't think he would want to know what happened?

What you post as 'the error that is displayed' is just the form html - not an error?

Why do you have a second thread for exactly the same question?

FireFilip's avatar

What I post as the error displayed is actually what my browser is displaying ,and when I click the form I can see the html tags because the form isn't working!

Btw I have another post because I need all the help I can get.

Please or to participate in this conversation.