Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
php-version: '8.4'
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, tidy
coverage: none

Expand Down
1 change: 1 addition & 0 deletions .phpunit.cache/test-results

Large diffs are not rendered by default.

60 changes: 0 additions & 60 deletions app/Console/Kernel.php

This file was deleted.

104 changes: 0 additions & 104 deletions app/Exceptions/Handler.php

This file was deleted.

3 changes: 1 addition & 2 deletions app/Http/Controllers/Auth/ConfirmPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
use Illuminate\Foundation\Auth\ConfirmsPasswords;

class ConfirmPasswordController extends Controller
Expand All @@ -55,7 +54,7 @@ class ConfirmPasswordController extends Controller
*
* @var string
*/
protected $redirectTo = RouteServiceProvider::HOME;
protected $redirectTo = '/dashboard';

/**
* Create a new controller instance.
Expand Down
3 changes: 1 addition & 2 deletions app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
use App\Http\Controllers\Controller;
use App\Models\User;
use App\Notifications\SendToken2FA;
use App\Providers\RouteServiceProvider;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
Expand All @@ -60,7 +59,7 @@ class LoginController extends Controller
*
* @var string
*/
protected $redirectTo = RouteServiceProvider::HOME;
protected $redirectTo = '/dashboard';

/**
* Create a new controller instance.
Expand Down
3 changes: 1 addition & 2 deletions app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
use App\User;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Support\Facades\Hash;
Expand All @@ -58,7 +57,7 @@ class RegisterController extends Controller
*
* @var string
*/
protected $redirectTo = RouteServiceProvider::HOME;
protected $redirectTo = '/dashboard';

/**
* Create a new controller instance.
Expand Down
3 changes: 1 addition & 2 deletions app/Http/Controllers/Auth/ResetPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
use Illuminate\Foundation\Auth\ResetsPasswords;

class ResetPasswordController extends Controller
Expand All @@ -55,5 +54,5 @@ class ResetPasswordController extends Controller
*
* @var string
*/
protected $redirectTo = RouteServiceProvider::HOME;
protected $redirectTo = '/dashboard';
}
3 changes: 1 addition & 2 deletions app/Http/Controllers/Auth/TwoFactorAuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
use MichaelDzjap\TwoFactorAuth\Http\Controllers\TwoFactorAuthenticatesUsers;

class TwoFactorAuthController extends Controller
Expand All @@ -29,7 +28,7 @@ class TwoFactorAuthController extends Controller
*
* @var string
*/
protected $redirectTo = RouteServiceProvider::HOME;
protected $redirectTo = '/dashboard';

/**
* Show the application's two-factor authentication form.
Expand Down
3 changes: 1 addition & 2 deletions app/Http/Controllers/Auth/VerificationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
use Illuminate\Foundation\Auth\VerifiesEmails;

class VerificationController extends Controller
Expand All @@ -55,7 +54,7 @@ class VerificationController extends Controller
*
* @var string
*/
protected $redirectTo = RouteServiceProvider::HOME;
protected $redirectTo = '/dashboard';

/**
* Create a new controller instance.
Expand Down
7 changes: 5 additions & 2 deletions app/Http/Controllers/Data/LaporanPendudukController.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function getData(Request $request)

return DataTables::of($query)
->addColumn('aksi', function ($row) {
$data['delete_url'] = auth()->user()->can('access.data.laporan-penduduk.delete') ? route('data.laporan-penduduk.destroy', $row->id) : null;
$data['delete_url'] = auth()->user()->can('access.data.laporan_penduduk.delete') ? route('data.laporan-penduduk.destroy', $row->id) : null;
$data['download_url'] = asset('storage/laporan_penduduk/' . $row->nama_file);

return view('forms.aksi', $data);
Expand Down Expand Up @@ -169,7 +169,10 @@ public function do_import(Request $request)

// Ekstrak file
$zip = new ZipArchive();
$zip->open($path);
$result = $zip->open($path);
if ($result !== true) {
throw new \RuntimeException("File ZIP tidak valid atau rusak. Kode error: {$result}");
}
$zip->extractTo($extract);
$zip->close();

Expand Down
36 changes: 33 additions & 3 deletions app/Http/Controllers/FrontEnd/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Session;
use willvincent\Feeds\Facades\FeedsFacade;
use SimplePie;
use App\Http\Controllers\FrontEndController;
use App\Http\Requests\SurveiRequest;
use App\Models\Kategori;
Expand Down Expand Up @@ -82,8 +82,38 @@ public function beritaDesa()
}

private function getFeeds()
{
$feeds = (new DesaService())->getFeeds();
{
$all_desa = DataDesa::websiteUrl()->get()
->map(function ($desa) {
return $desa->website_url_feed;
})->all();

$feeds = [];
foreach ($all_desa as $desa) {
$getFeeds = new SimplePie();
$getFeeds->set_feed_url($desa['website']);
$getFeeds->set_item_limit(5);
$getFeeds->force_fsockopen(true);
$getFeeds->set_cache_location(storage_path('framework/cache/simplepie'));
$getFeeds->init();
$getFeeds->handle_content_type();
foreach ($getFeeds->get_items() as $item) {
$feeds[] = [
'desa_id' => $desa['desa_id'],
'nama_desa' => $desa['nama'],
'feed_link' => $item->get_feed()->get_permalink(),
'feed_title' => $item->get_feed()->get_title(),
'link' => $item->get_link(),
'date' => \Carbon\Carbon::parse($item->get_date('U')),
'author' => $item->get_author()->get_name() ?? 'Administrator',
'title' => $item->get_title(),
'image' => get_tag_image($item->get_description()),
'description' => strip_tags(substr(str_replace(['&', 'nbsp;', '[...]'], '', $item->get_description()), 0, 250) . '[...]'),
'content' => $item->get_content(),
];
}
}

return $feeds ?? null;
}

Expand Down
5 changes: 5 additions & 0 deletions app/Http/Controllers/FrontEndController.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ class FrontEndController extends Controller
public function __construct()
{
parent::__construct();

if (!sudahInstal()) {
return;
}

theme_active();

$this->settings = SettingAplikasi::pluck('value', 'key');
Expand Down
Loading
Loading