Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //config.neon
- services:
- Users: Users(@database)
- //Users.php
- <?php
- use Nette\Application\UI;
- use Nette\Security as NS;
- class Users
- {
- private $db;
- public function __construct(Nette\Database\Connection $db)
- {
- $this->db = $db;
- }
- public function activeCompany($id)
- {
- return $this->db->table('users')->where('id=?',$id)->fetch()->company_id;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment