I've created something like laraval.io. That's my table:
Schema::create('forum', function(Blueprint $table){
$table->increments('id');
$table->integer('userId');
$table->integer('solved');
$table->string('title');
$table->string('category');
$table->text('text');
$table->timestamps();
});
I do not know how is the right way to get the name of the user who added the question. Can someone explain me that or give some sources where I can learn something about it ? I'll be very grateful.
Are you using Eloquent (the ORM)? If so you'll need to create a model containing a relationship, otherwise you'd be using the query builder to create a join.
Eloquent: http://laravel.com/docs/eloquent#relationships Query Builder: http://laravel.com/docs/queries#joins
I've made it by trial and error. Anyway thank you !
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community