File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 66use Illuminate \Support \Facades \Hash ;
77use Cohensive \OEmbed \Facades \OEmbed ;
88use Illuminate \Support \Facades \Schema ;
9+ use Illuminate \Support \Facades \Route ;
910
1011use Auth ;
1112use DB ;
@@ -121,6 +122,23 @@ public function AddUpdateLink($id = 0)
121122 $ data ['LinkData ' ] = $ linkData ;
122123 $ data ['LinkID ' ] = $ id ;
123124 $ data ['title ' ] = "link " ;
125+ $ data ['linkTypeID ' ] = "1 " ;
126+
127+ if (Route::currentRouteName () != 'showButtons ' ) {
128+ $ links = DB ::table ('links ' )->where ('id ' , $ id )->first ();
129+
130+ $ bid = $ links ->button_id ;
131+
132+ if ($ bid == 1 or $ bid == 2 ){
133+ $ data ['linkTypeID ' ] = "1 " ;
134+ } elseif ($ bid == 42 ) {
135+ $ data ['linkTypeID ' ] = "3 " ;
136+ } elseif ($ bid == 43 ) {
137+ $ data ['linkTypeID ' ] = "4 " ;
138+ } else {
139+ $ data ['linkTypeID ' ] = "2 " ;
140+ }
141+ }
124142
125143 foreach ($ data ['LinkTypes ' ]->toArray () as $ key => $ val ) {
126144 if ($ val ['typename ' ] === $ linkData ['typename ' ]) {
You can’t perform that action at this time.
0 commit comments