basic profile edit page, not working yet
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
class UserController extends Controller
|
||||
@@ -11,7 +10,7 @@ class UserController extends Controller
|
||||
/**
|
||||
* Show the application dashboard.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function view(User $user)
|
||||
{
|
||||
@@ -21,4 +20,20 @@ class UserController extends Controller
|
||||
|
||||
return view('user.view')->with(compact('tables', 'user'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit user profile
|
||||
*
|
||||
* @param User $user
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
return view('user.edit')->with('user', \Auth::user());
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
echo "Not impl";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ use MightyPork\Exceptions\NotExistException;
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @property string $name - unique, for vanity URL
|
||||
* @property string $title - for display
|
||||
* @property string $bio - user bio
|
||||
* @property string $email - unique, for login and social auth chaining
|
||||
* @property string $password - hashed pw
|
||||
* @property bool $confirmed - user e-mail is confirmed
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ class Widget
|
||||
|
||||
// add a compiled list of styles
|
||||
if (!empty($this->styleArray)) {
|
||||
$attribs_s .= 'style="'.trim(e(array_reduce(array_keys($this->styleArray), function ($carry, $key) {
|
||||
$attribs_s .= ' style="'.trim(e(array_reduce(array_keys($this->styleArray), function ($carry, $key) {
|
||||
return $carry . $key . ': ' . $this->styleArray[$key] . '; ';
|
||||
}, ''))).'"';
|
||||
}
|
||||
|
||||
@@ -14,6 +14,20 @@ class WidgetFactory
|
||||
$this->fieldCols = $fieldCols;
|
||||
}
|
||||
|
||||
public function header($hx, $text)
|
||||
{
|
||||
return "<div class=\"row\">".
|
||||
"<h$hx class=\"col-md-$this->fieldCols offset-md-$this->labelCols\">".e($text)."</h$hx>".
|
||||
"</div>";
|
||||
}
|
||||
|
||||
public function par($text)
|
||||
{
|
||||
return "<div class=\"row\">".
|
||||
"<p class=\"col-md-$this->fieldCols offset-md-$this->labelCols\">".e($text)."</o>".
|
||||
"</div>";
|
||||
}
|
||||
|
||||
private function baseWidget($view, $name, $label)
|
||||
{
|
||||
return (new Widget($view, $name, $label))->layout($this->labelCols, $this->fieldCols);
|
||||
|
||||
Reference in New Issue
Block a user