feat: add limitation to free accounts (#1715)

This commit is contained in:
Régis Freyd
2018-08-18 18:07:49 -04:00
committed by GitHub
parent 2282e4c237
commit 395e49f039
18 changed files with 211 additions and 70 deletions
@@ -97,6 +97,12 @@ class ContactsController extends Controller
*/
public function create()
{
if (auth()->user()->account->hasReachedContactLimit()
&& auth()->user()->account->hasLimitations()
&& ! auth()->user()->account->legacy_free_plan_unlimited_contacts) {
return redirect()->route('settings.subscriptions.index');
}
$data = [
'genders' => auth()->user()->account->genders,
];