1In App -> project.php modal file
2
3
4 // NOTE: service #1 : General Translation
5 public static function translationTypes()
6 {
7 return collect([
8 [
9 'id' => '1',
10 'en_title' => 'Medical',
11 ],
12 [
13 'id' => '2',
14 'en_title' => 'General',
15 ],
16 [
17 'id' => '3',
18 'en_title' => 'Commercial',
19 ],
20 [
21 'id' => '4',
22 'en_title' => 'Literary',
23 ],
24 ]);
25 }
26
27
28In Controller
29
30 $translationTypes = Project::translationTypes();
31
32In View
33
34 @foreach($translationTypes as $translationType)
35 <option value="{{$translationType['id']}}">{{ $translationType['en_title'] }}</option>
36 @endforeach
37
38