-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from maling-it/base/dev
Buat Komponen dan model untk peta openlayer
- Loading branch information
Showing
23 changed files
with
325 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers; | ||
|
||
use Illuminate\Http\Request; | ||
use Illuminate\Support\Facades\Http; | ||
|
||
class DeviceController extends Controller | ||
{ | ||
public function show($id) | ||
{ | ||
$apiUrl = env('API_URL') . "/api/v1/device/{$id}"; | ||
$response = Http::get($apiUrl); | ||
|
||
$device = $response->json(); | ||
|
||
return view('device.show', compact('device')); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace App\View\Components; | ||
|
||
use Closure; | ||
use Illuminate\Contracts\View\View; | ||
use Illuminate\View\Component; | ||
|
||
class AppLayout extends Component | ||
{ | ||
/** | ||
* Create a new component instance. | ||
*/ | ||
public function __construct() | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Get the view / contents that represent the component. | ||
*/ | ||
public function render(): View|Closure|string | ||
{ | ||
return view('layouts.app'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
namespace App\View\Components; | ||
|
||
use Closure; | ||
use Illuminate\Contracts\View\View; | ||
use Illuminate\View\Component; | ||
use Illuminate\Support\Facades\Http; | ||
|
||
class MapTanahku extends Component | ||
{ | ||
public $devices; | ||
|
||
/** | ||
* Create a new component instance. | ||
*/ | ||
public function __construct() | ||
{ | ||
$apiUrl = env('API_URL') . "/api/v1/device/all"; | ||
$response = Http::get($apiUrl); | ||
|
||
$this->devices = $response->json()['data']; | ||
} | ||
|
||
/** | ||
* Get the view / contents that represent the component. | ||
*/ | ||
public function render(): View|Closure|string | ||
{ | ||
return view('components.map-tanahku'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
database/migrations/2014_10_12_000000_create_users_table.php
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
database/migrations/2019_08_19_000000_create_failed_jobs_table.php
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
{ | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build" | ||
}, | ||
"devDependencies": { | ||
"axios": "^1.6.4", | ||
"laravel-vite-plugin": "^1.0.0", | ||
"vite": "^5.0.0" | ||
} | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build" | ||
}, | ||
"devDependencies": { | ||
"axios": "^1.6.4", | ||
"laravel-vite-plugin": "^1.0.0", | ||
"vite": "^5.0.0", | ||
"ol": "^8.2.0" | ||
}, | ||
"dependencies": { | ||
"bootstrap": "5.3.2", | ||
"halfmoon": "2.0.1" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@import "../../node_modules/ol/ol.css"; | ||
|
||
html, | ||
body { | ||
margin: 0; | ||
height: 100%; | ||
} | ||
|
||
#map { | ||
position: absolute; | ||
top: 0; | ||
bottom: 0; | ||
width: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
import './bootstrap'; | ||
// Import Halfmoon CSS | ||
import "halfmoon/css/cores/halfmoon.cores.css"; | ||
import "halfmoon/css/halfmoon.min.css"; | ||
|
||
import './olmain'; | ||
|
||
// some script here | ||
const popoverTriggerList = document.querySelectorAll( | ||
"[data-bs-toggle='popover']" | ||
); | ||
const popoverList = [...popoverTriggerList].map( | ||
popoverTriggerEl => new bootstrap.Popover(popoverTriggerEl) | ||
); |
Oops, something went wrong.