feat: implement internship creation and company listing

This commit is contained in:
2025-10-31 14:20:10 +01:00
parent 4979b4ddd3
commit f388f093e3
3 changed files with 76 additions and 2 deletions
@@ -3,10 +3,21 @@
namespace App\Http\Controllers;
use App\Models\Company;
use App\Models\User;
use Illuminate\Http\Request;
class CompanyController extends Controller
{
public function all_simple() {
$companies = Company::all()->makeHidden(['created_at', 'updated_at']);
$companies->each(function ($company) {
$company->contact = User::find($company->contact)->makeHidden(['created_at', 'updated_at', 'email_verified_at']);
});
return response()->json($companies);
}
/**
* Display a listing of the resource.
*/