Skip to content

Commit

Permalink
rename kapital website profile
Browse files Browse the repository at this point in the history
  • Loading branch information
ShiranaiZo committed Sep 21, 2023
1 parent 793dff0 commit ef45acf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/API/WebsiteProfileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace App\Http\Controllers\API;

use App\Http\Controllers\Controller;
use App\Models\websiteProfile;
use App\Models\WebsiteProfile;
use Illuminate\Http\Request;

class WebsiteProfileController extends Controller
Expand All @@ -13,7 +13,7 @@ class WebsiteProfileController extends Controller
*/
public function index()
{
$contact = websiteProfile::select('website_name', 'tagline', 'keyword', 'description', 'logo', 'url', 'email', 'hp', 'address', 'map', 'year_now')->first();
$contact = WebsiteProfile::select('website_name', 'tagline', 'keyword', 'description', 'logo', 'url', 'email', 'hp', 'address', 'map', 'year_now')->first();

return ResponseFormatter::success($contact, 'Contact retrieved successfully!');
}
Expand Down
6 changes: 3 additions & 3 deletions app/Http/Controllers/WebsiteProfileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace App\Http\Controllers;

use App\Models\websiteProfile;
use App\Models\WebsiteProfile;
use Auth;
use Illuminate\Http\Request;

Expand All @@ -13,7 +13,7 @@ class WebsiteProfileController extends Controller
*/
public function store(Request $request)
{
$website_profile = websiteProfile::first();
$website_profile = WebsiteProfile::first();

$request->validate([
'website_name' => 'required',
Expand Down Expand Up @@ -51,7 +51,7 @@ public function store(Request $request)
$website_profile = $website_profile->update($data);
}else{
// Jika tidak ada maka create
$website_profile = websiteProfile::create($data);
$website_profile = WebsiteProfile::create($data);
}

return redirect('website-profile')->with('success', 'Website Profile'.($website_profile ? "Updated!" : "Saved!") );
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Helpers/Helpers.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

use App\Models\User;
use App\Models\websiteProfile;
use App\Models\WebsiteProfile;

function website_profile(){
$website_profile = websiteProfile::first();
$website_profile = WebsiteProfile::first();

return $website_profile;
}
Expand Down
2 changes: 1 addition & 1 deletion app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,6 @@ class User extends Authenticatable
*/
public function websiteProfile()
{
return $this->hasMany(websiteProfile::class, 'modified_by', 'id');
return $this->hasMany(WebsiteProfile::class, 'modified_by', 'id');
}
}

0 comments on commit ef45acf

Please sign in to comment.