Using Laravel 5.6 I'm trying to display two different tables in the same view, but it's giving error
This is my controller
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\NossaCasa;
use App\NossacasaTitulo;
class NossaCasaController extends Controller
{
public function index(){
$nossacasa = NossaCasa::all();
return view('nossacasa.nossacasa', array('nossacasa' => $nossacasa));
$nossacasatitulo = NossacasaTitulo::find(1);
return view('nossacasa.nossacasa', array('nossacasa' => $nossacasatitulo));
}
}
The error that is returning on the page is as follows
"Undefined variable: nossacasatitulo (View: /home/centroculturalvastimilla/www/admin/resources/views/nossacasa/nossacasa.blade.php) "