0
Using the Laravel 5.6 I am trying to display two different tables in the same view, but it is 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 is returning on the page is as follows
"Undefined variable: nossacasatitulo (View: /home/centroculturalvastimilla/www/admin/Resources/views/nossacasa/nossacasa.blade.php)"