I'm new to programming specially in Laravel, I hope you could help me. It means a lot for me. I'm not a degree holder I'm just studying programming by myself.
Now for my problem I have an old database full of data, to be specific it's a human resources database full of employee's personal information. Now what I want to do is pull out all data's from different tables that belongs to 1 employee and display in my view. for now I have only this view welcome and home.
Home View
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header"><strong>Welcome back! {{Auth::user()->name}}</strong></div>
<div class="card-body">
@if (session('status'))
<div class="alert alert-success">
{{ session('status') }}
</div>
@endif
<h4>Personal Information</h4>
</div>
</div>
</div>
</div>
</div>
@endsection
HomeController.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
/**
* Show the application dashboard.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return view('home');
}
}
This has a login and register also, now to further explain when an employee logged in, the data's based on his/her employee_id will be displayed. I will be creating more view files like file_leave leave_balances to name the few. If you need more information I will comply it so you could help me conveniently. Thanks in advance.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community