Why when I send username, notes and email, the result as you will see at the end of the page is empty ?
Where do you send these data?
Hello all,
You are really very helpful here, so, thank you in advance for your help.
I'm learning by doing some test on the following link : http://demo.beginfromhere.com/laravel/public/users
Based on the following lesson : https://laracasts.com/series/laravel-5-fundamentals/episodes/10?autoplay=true
Why when I send username, notes and email, the result as you will see at the end of the page is empty ?
The PageController file is the following :
<?php
namespace App\Http\Controllers;
use Request;
use App\User;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Carbon\Carbon;
class PagesController extends Controller
{
public function index()
{
$users = User::all();
return view('pages.index', compact('users'));
}
public function users()
{
$users = User::all();
return view('pages.users', compact('users'));
}
public function show($id)
{
$user = User::findOrFail($id);
return view('pages.show', compact('user'));
}
public function show2()
{
return view('pages.show2');
}
public function store()
{
$input = Request::all();
$input['published_at'] = Carbon::now();
User::create($input);
return redirect ('users');
}
}
Please or to participate in this conversation.