mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Working on client portal profile
This commit is contained in:
parent
9d76b234a8
commit
9b1075539c
55
app/Http/Controllers/ClientPortal/ProfileController.php
Normal file
55
app/Http/Controllers/ClientPortal/ProfileController.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
* @copyright Copyright (c) 2019. Invoice Ninja LLC (https://invoiceninja.com)
|
||||
*
|
||||
* @license https://opensource.org/licenses/AAL
|
||||
*/
|
||||
|
||||
namespace App\Http\Controllers\ClientPortal;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\ClientContact;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ProfileController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit(ClientContact $client_contact)
|
||||
{
|
||||
dd($client_contact);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, ClientContact $client_contact)
|
||||
{
|
||||
dd($client_contact);
|
||||
}
|
||||
|
||||
}
|
@ -42,6 +42,15 @@ class ClientContact extends Authenticatable
|
||||
/* Allow microtime timestamps */
|
||||
protected $dateFormat = 'Y-m-d H:i:s.u';
|
||||
|
||||
protected $appends = [
|
||||
'hashed_id'
|
||||
];
|
||||
|
||||
public function getHashedIdAttribute()
|
||||
{
|
||||
return $this->encodePrimaryKey($this->id);
|
||||
}
|
||||
|
||||
protected $hidden = [
|
||||
'password',
|
||||
'remember_token',
|
||||
|
@ -49,6 +49,15 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
|
||||
public $company;
|
||||
|
||||
protected $appends = [
|
||||
'hashed_id'
|
||||
];
|
||||
|
||||
public function getHashedIdAttribute()
|
||||
{
|
||||
return $this->encodePrimaryKey($this->id);
|
||||
}
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
|
@ -45,7 +45,7 @@
|
||||
<div class="dropdown-header text-center">
|
||||
<strong>@lang('texts.settings')</strong>
|
||||
</div>
|
||||
<a class="dropdown-item" href="#">
|
||||
<a class="dropdown-item" href="{{ route('client.profile.edit', ['id' => auth()->user()->hashed_id])}}">
|
||||
<i class="fa fa-user"></i> @lang('texts.profile')</a>
|
||||
<a class="dropdown-item" href="">
|
||||
<i class="fa fa-wrench"></i> @lang('texts.settings')</a>
|
||||
|
@ -14,6 +14,8 @@ Route::group(['middleware' => ['auth:contact'], 'prefix' => 'client', 'as' => 'c
|
||||
|
||||
Route::get('dashboard', 'ClientPortal\DashboardController@index')->name('dashboard'); // name = (dashboard. index / create / show / update / destroy / edit
|
||||
Route::get('invoices', 'ClientPortal\InvoiceController@index')->name('invoices.index'); // name = (dashboard. index / create / show / update / destroy / edit
|
||||
Route::get('profile/{client_contact}/edit', 'ClientPortal\ProfileController@edit')->name('profile.edit');
|
||||
Route::put('profile/{client_contact}/edit', 'ClientPortal\ProfileController@update')->name('profile.update');
|
||||
|
||||
Route::get('logout', 'Auth\ContactLoginController@logout')->name('logout');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user