https://github.com/adminarchitect/contacts
Admin Architect - Contact Page
https://github.com/adminarchitect/contacts
Last synced: 5 months ago
JSON representation
Admin Architect - Contact Page
- Host: GitHub
- URL: https://github.com/adminarchitect/contacts
- Owner: adminarchitect
- License: mit
- Created: 2016-02-23T09:59:40.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-25T14:06:15.000Z (about 10 years ago)
- Last Synced: 2025-08-16T05:26:31.701Z (10 months ago)
- Language: PHP
- Size: 1.45 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Admin Architect - Contacts module
`Note:` The backend part of this package can be used only in conjunction with `Admin Architect` (`terranet/administrator`) package.
## Installation
```
composer require adminarchitect/contacts
```
add service provider to `config/app.php`:
```
'providers' => [
...
Terranet\Contacts\ServiceProvider::class
...
]
```
```
php artisan vendor:publish --provider="Terranet\\Contacts\\ServiceProvider"
```
## Usage
```
$contacts = new Contacts('Google Inc.');
$contacts
->setDescription('
We’ve come a long way from the dorm room and the garage.
' .
'We moved into our headquarters in Mountain View, California—better known as the Googleplex—in 2004.
' .
'Today Google has more than 70 offices in more than 40 countries around the globe.
')
->setEmails(['info@google.com'])
->setPhones(['+1 734-332-6500', '+1 248-593-4000']);
$contacts->setAddress('1600 Amphitheatre Parkway Mountain View, CA 94043');
$contacts->department('Google Ann Arbor', function ($department) {
$department->setDescription('Software development')
->setAddress('201 S. Division St. Suite 500 Ann Arbor, MI 48104')
->setPhones(['+1 734-332-6500'])
->setEmails(['support@google.com']);
});
$contacts->department('Google Detroit', function ($department) {
$department->setDescription('Software development')
->setAddress('114 Willits Street Birmingham, MI 48009')
->setPhones(['+1 248-593-4000'])
->setEmails(['support@google.com']);
});
return $contacts->render();
```
# Templates
Choose the template from one of predefined or create new one: `config/contacts.php` section `template`

### two columns

### Or in rows
