Skip to content

Commit

Permalink
Update README.md (#70)
Browse files Browse the repository at this point in the history
* Update README.md

Updated code example

* proper fix

Co-authored-by: Imants Horsts <[email protected]>
  • Loading branch information
webbird and DarkSide666 authored Mar 3, 2021
1 parent 75caac3 commit 0aee3a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ $app->initLayout([\Atk4\Ui\Layout\Admin::class]);
$app->db = new \Atk4\Data\Persistence($dsn);

// ADD THIS CODE:
$app->add(new \Atk4\Login\Auth())
->setModel(new User($app->db));
$app->auth = new \Atk4\Login\Auth();
$app->auth->setModel(new \Atk4\Login\Model\User($app->db));

// The rest of YOUR UI code will now be protected
$app->add([\Atk4\Ui\Crud:class])->setModel(new Client($app->db));
Expand Down

0 comments on commit 0aee3a4

Please sign in to comment.