Witam, mam problem, a mianowicie po dodaniu filmu do bazy danych ustawia się sesja z wiadomością, a potem w widoku jest sprawdzane czy sesja została ustawiona, ale gdy jest to nie wyświetla tekstu w niej, tylko pustego diva.
Kod controllera:
public function store(VideoRequest $request) { Video::create($request->all()); Session::flash('video_created', 'Twój film został dodany !'); return Redirect('videos'); }
a tu kod widoku:
@extends('master') @section('content') @if(Session::has('video_created')) <li class="alert alert-success">{{ Session::get('video_created') }}</li> @endif @foreach($videos as $video) <div style="border: solid 1px black; width: auto; text-align: center;"> <h2><a href="/videos/{{ $video->id }}">{{ $video->title }}</a></h2> <br> {{ $video->url }} <br> {{ $video->description }} <br> Video dodane przez: <span style="color: #196c4b">{{ $video->author }}</span> </div> <br> <br> @endforeach @stop
i tak jak mówiłem, wyświetla się szerokie zielone pole komunikatu, ale bez tekstu