Add methods to various page controllers for handling index, store, and show actions
This commit is contained in:
@@ -2,7 +2,23 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Career;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CareersPageController extends Controller
|
||||
{
|
||||
//
|
||||
public function index()
|
||||
{
|
||||
return view('web.pages.careers.index');
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
dd($request->all());
|
||||
}
|
||||
|
||||
public function show(Career $career)
|
||||
{
|
||||
return view('web.pages.careers.show', compact('career'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,17 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ContactPageController extends Controller
|
||||
{
|
||||
//
|
||||
public function index()
|
||||
{
|
||||
return view('web.pages.contact.index');
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
dd($request->all());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,23 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\Internship;
|
||||
|
||||
class InternshipsPageController extends Controller
|
||||
{
|
||||
//
|
||||
public function index()
|
||||
{
|
||||
return view('web.pages.internships.index');
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
dd($request->all());
|
||||
}
|
||||
|
||||
public function show(Internship $internship)
|
||||
{
|
||||
return view('web.pages.internships.show', compact('internship'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,5 +4,13 @@ namespace App\Http\Controllers;
|
||||
|
||||
class LegalPageController extends Controller
|
||||
{
|
||||
//
|
||||
public function terms()
|
||||
{
|
||||
return view('web.pages.legal.terms');
|
||||
}
|
||||
|
||||
public function privacy()
|
||||
{
|
||||
return view('web.pages.legal.privacy');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,17 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\News;
|
||||
|
||||
class NewsPageController extends Controller
|
||||
{
|
||||
//
|
||||
public function index()
|
||||
{
|
||||
return view('web.pages.news.index');
|
||||
}
|
||||
|
||||
public function show(News $news)
|
||||
{
|
||||
return view('web.pages.news.show', compact('news'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,17 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Solution;
|
||||
|
||||
class OurSolutionPageController extends Controller
|
||||
{
|
||||
//
|
||||
public function index()
|
||||
{
|
||||
return view('web.pages.our-solutions.index');
|
||||
}
|
||||
public function show(Solution $solution)
|
||||
|
||||
{
|
||||
return view('web.pages.our-solutions.show', compact('solution'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,17 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Story;
|
||||
|
||||
class StoryPageController extends Controller
|
||||
{
|
||||
//
|
||||
public function index()
|
||||
{
|
||||
return view('web.pages.stories.index');
|
||||
}
|
||||
|
||||
public function show(Story $story)
|
||||
{
|
||||
return view('web.pages.stories.show', compact('story'));
|
||||
}
|
||||
}
|
||||
|
||||
15
app/Models/Career.php
Normal file
15
app/Models/Career.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Career extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'description',
|
||||
'location',
|
||||
'salary',
|
||||
];
|
||||
}
|
||||
10
app/Models/Internship.php
Normal file
10
app/Models/Internship.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Internship extends Model
|
||||
{
|
||||
//
|
||||
}
|
||||
18
app/Models/News.php
Normal file
18
app/Models/News.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class News extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'slug',
|
||||
'content',
|
||||
'published_at',
|
||||
];
|
||||
}
|
||||
17
app/Models/Solution.php
Normal file
17
app/Models/Solution.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Solution extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'description',
|
||||
'slug',
|
||||
];
|
||||
}
|
||||
18
app/Models/Story.php
Normal file
18
app/Models/Story.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Story extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'slug',
|
||||
'content',
|
||||
'published_at',
|
||||
];
|
||||
}
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Filament\CMS\Home\HomeSettings;
|
||||
use App\Models\Brand;
|
||||
use App\Settings\SiteSettings;
|
||||
use App\Settings\SiteSocialSettings;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Settings\HomeSettings;
|
||||
use Illuminate\Support\Facades\View as ViewFacade;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\View\View;
|
||||
|
||||
Reference in New Issue
Block a user