diff --git a/app/Http/Controllers/IPsController.php b/app/Http/Controllers/IPsController.php index b34e3c8..810d407 100644 --- a/app/Http/Controllers/IPsController.php +++ b/app/Http/Controllers/IPsController.php @@ -2,34 +2,27 @@ namespace App\Http\Controllers; +use App\Models\IPs; use Illuminate\Http\Request; +use Illuminate\Support\Facades\DB; class IPsController extends Controller { - /** - * Display a listing of the resource. - * - * @return \Illuminate\Http\Response - */ public function index() { - // + $ips = IPs::all(); + return view('ips.index', compact('ips')); } - /** - * Show the form for creating a new resource. - * - * @return \Illuminate\Http\Response - */ public function create() { - // + return view('ips.create'); } /** * Store a newly created resource in storage. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) @@ -40,7 +33,7 @@ class IPsController extends Controller /** * Display the specified resource. * - * @param int $id + * @param int $id * @return \Illuminate\Http\Response */ public function show($id) @@ -51,7 +44,7 @@ class IPsController extends Controller /** * Show the form for editing the specified resource. * - * @param int $id + * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) @@ -62,8 +55,8 @@ class IPsController extends Controller /** * Update the specified resource in storage. * - * @param \Illuminate\Http\Request $request - * @param int $id + * @param \Illuminate\Http\Request $request + * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id) @@ -74,7 +67,7 @@ class IPsController extends Controller /** * Remove the specified resource from storage. * - * @param int $id + * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) diff --git a/resources/views/ips/create.blade.php b/resources/views/ips/create.blade.php new file mode 100644 index 0000000..9a34d0e --- /dev/null +++ b/resources/views/ips/create.blade.php @@ -0,0 +1,133 @@ +@section('title') {{'Insert DNS'}} @endsection + + + {{ __('Insert a new DNS') }} + +
+ +

DNS information

+ + {{ route('dns.index') }} + Go back + + +
+ @csrf +
+
+
+
Hostname
+ + @error('name') {{ $message }} + @enderror +
+
+
+ + address + address + +
+
+
+
Type
+
+
+
+
+
+ + label + label1 + +
+
+ + label + label2 + +
+
+ + label + label3 + +
+
+ + label + label4 + +
+
+
+

Related to:

+
+
+
Server
+
+
+
+
+
Shared
+
+
+
+
+
Reseller
+
+
+
+
+
Domain
+
+
+
+
+
+ Insert DNS +
+
+
+
+
+
diff --git a/resources/views/ips/index.blade.php b/resources/views/ips/index.blade.php new file mode 100644 index 0000000..3888714 --- /dev/null +++ b/resources/views/ips/index.blade.php @@ -0,0 +1,64 @@ +@section('title') {{'IP addresses'}} @endsection +@section('style') + +@endsection + + + {{ __('IP addresses') }} + +
+ + + Add IP + +
+ + + + + + + + + + @if(!empty($dn)) + @foreach($dn as $dns) + + + + + + @endforeach + @else + + + + @endif + +
TypeAddressActions
{{ $dns->is_ipv4}}{{ $dns->address}} +
+ + + + + @csrf + @method('DELETE') + +
+
No IPs found.
+
+
+ @if(Session::has('timer_version_footer') && Session::get('timer_version_footer') === 1) +

+ Built on Laravel v{{ Illuminate\Foundation\Application::VERSION }} (PHP v{{ PHP_VERSION }} + ) +

+ @endif +
+ + ips + +
diff --git a/routes/web.php b/routes/web.php index 0b98976..1e0522d 100644 --- a/routes/web.php +++ b/routes/web.php @@ -3,6 +3,7 @@ use App\Http\Controllers\AccountController; use App\Http\Controllers\DNSController; use App\Http\Controllers\DomainsController; +use App\Http\Controllers\IPsController; use App\Http\Controllers\LabelsController; use App\Http\Controllers\LocationsController; use App\Http\Controllers\MiscController; @@ -41,7 +42,7 @@ Route::resource('dns', DNSController::class)->middleware(['auth']); Route::resource('domains', DomainsController::class)->middleware(['auth']); -Route::resource('IPs', DomainsController::class)->middleware(['auth']); +Route::resource('IPs', IPsController::class)->middleware(['auth']); Route::resource('labels', LabelsController::class)->middleware(['auth']);