Download the PHP package spatie/laravel-help-space without Composer
On this page you can find all versions of the php package spatie/laravel-help-space. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download spatie/laravel-help-space
More information about spatie/laravel-help-space
Files in spatie/laravel-help-space
Package laravel-help-space
Short Description Integrate Helpspace in your Laravel app
License MIT
Homepage https://github.com/spatie/laravel-help-space
Informations about the package laravel-help-space
Integrate HelpSpace in your Laravel app
HelpSpace is a beautiful help desk service. One of its features is that it can display a sidebar with extra information about the person that opened a ticket.
HelpSpace sends a request to your app to get the HTML content to populate that sidebar. Our package makes it easy to validate if an incoming request from HelpSpace is valid and allows you to respond to it.
When installed, this is how you can respond to an incoming request from HelpSpace.
Support us
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
Installation
You can install the package via composer:
To publish the config file and to create the app/Providers/HelpSpaceServiceProvider.app
class in your app, run this command.
This is the contents of the published config file at config/help-space.php
app:
Next, In your .env
file, you must set a new env-variable called HELP_SPACE_SECRET
to a random string. At HelpSpace you must navigate to the "Custom Ticket sidebar" in the integration settings. There you must input that random string. This secret will be used to verify if an incoming request is really coming from HelpSpace.
The package will automatically register a route at /help-space
. This route can be customized.
Usage
If you ran the install command from the section above, then your application a HelpSpaceServiceProvider.php
service provider in app/Providers
. This is the content.
The callable in sidebar
will be executed whenever HelpSpace sends a request to your app. The email()
method of the given HelpSpaceRequest
will contain the email address of the person that opened the ticket.
Instead of returning a string, you can also return a view.
Preview the content of the sidebar
When working on the view that returns the HTML of the sidebar, it can be handy to preview it locally, instead of letting HelpScout sending requests.
To see the HTML for a given email address, you can use the help-space:render-sidebar
command.
Customizing the registered route
The package will automatically register a route at /help-space
. You can change this value in the help-space.php
config file.
Alternatively, you can register your own route.
First, you must set the url
key in the help-space.php
config file to null
Next, you must add this to your routes file, preferably routes/api.php
so that your app doesn't start a session when a new request comes in from HelpSpace.
The above route will register a route with URL https://yourdomain.com/api/your-custom-segment
(when you registered it in the api.php routes file.)
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Freek Van der Herten
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-help-space with dependencies
spatie/laravel-package-tools Version ^1.13.0
illuminate/contracts Version ^10.0|^11.0