/** * Display a listing of the activities. * * @return Response */ public function index(TextRepo $repo) { $texts = $repo->getAll(); return view('admin.texts.index', compact('texts')); }
function __construct(TextRepo $text_repo) { view()->share('texts', $text_repo->getAll()); }