fv@pc:~/projects-PRO/redis$ pip show requests
Name: requests
Version: 2.32.3
Summary: Python HTTP for Humans.
Home-page: https://requests.readthedocs.io
Author: Kenneth Reitz
Author-email: me@kennethreitz.org
License: Apache-2.0
Location: /home/fv/.local/lib/python3.10/site-packages
Requires: certifi, charset-normalizer, idna, urllib3
Required-by:
Name: requests
Version: 2.32.3
Summary: Python HTTP for Humans.
Home-page: https://requests.readthedocs.io
Author: Kenneth Reitz
Author-email: me@kennethreitz.org
License: Apache-2.0
Location: /home/fv/.local/lib/python3.10/site-packages
Requires: certifi, charset-normalizer, idna, urllib3
Required-by:
php artisan db:seed --class=CarBrandsSeeder
php artisan db:seed --class=CarModelsSeeder
php artisan db:seed --class=CitySynonymsSeeder
php artisan db:seed --class=CarModelsSeeder
php artisan db:seed --class=CitySynonymsSeeder
// if (!Auth::user()->can('edit posts')) {
// return response()->json([
// 'message' => 'У вас нет прав для создания поста.'
// ], 403);
// }
// return response()->json([
// 'message' => 'У вас нет прав для создания поста.'
// ], 403);
// }
laravel
// if (!Auth::user()->can('edit posts')) { // return response()->json([ // 'message' => 'У вас нет прав для создания поста.' // ], 403); // }
проверка доступа внутри контроллера laravel permision
importScripts("https://js.pusher.com/beams/service-worker.js");
http://localhost:3000/service-worker.js
<script src="https://js.pusher.com/beams/1.0/push-notifications-cdn.js"></script>
<script>
const beamsClient = new PusherPushNotifications.Client({
instanceId: '80677545-edec-4309-abd5-4148808f3e70',
});
beamsClient.start()
.then(() => beamsClient.addDeviceInterest('hello'))
.then(() => console.log('Successfully registered and subscribed!'))
.catch(console.error);
</script>
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer 07CE6C9E428CED08DA21C8320412E40B6ECD887C64FECAC6BEFBA97A3405D7A9" \
-X POST "https://80677545-edec-4309-abd5-4148808f3e70.pushnotifications.pusher.com/publish_api/v1/instances/80677545-edec-4309-abd5-4148808f3e70/publishes" \
-d '{"interests":["hello"],"web":{"notification":{"title":"Hello","body":"Hello, world!"}}}'
http://localhost:3000/service-worker.js
<script src="https://js.pusher.com/beams/1.0/push-notifications-cdn.js"></script>
<script>
const beamsClient = new PusherPushNotifications.Client({
instanceId: '80677545-edec-4309-abd5-4148808f3e70',
});
beamsClient.start()
.then(() => beamsClient.addDeviceInterest('hello'))
.then(() => console.log('Successfully registered and subscribed!'))
.catch(console.error);
</script>
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer 07CE6C9E428CED08DA21C8320412E40B6ECD887C64FECAC6BEFBA97A3405D7A9" \
-X POST "https://80677545-edec-4309-abd5-4148808f3e70.pushnotifications.pusher.com/publish_api/v1/instances/80677545-edec-4309-abd5-4148808f3e70/publishes" \
-d '{"interests":["hello"],"web":{"notification":{"title":"Hello","body":"Hello, world!"}}}'